Embedding editable code into Vite-press and custom containers
My journey to linking JSFiddle live cod samples into my side-project docs VitePress site with custom container via Mardown-it.
A tech blog giving usable explainers, advice, tools, tricks and techniques for the Konva JavaScript canvas library, the HTML5 canvas, and related subjects.
My journey to linking JSFiddle live cod samples into my side-project docs VitePress site with custom container via Mardown-it.
I've been vibe-coding - meaning using an editor with a built-in AI interface as a coding assistant - and here's a recent experience with Windsurf editor and GPT 4.1 that shows why coding with an Ai assistant is not the bed of roses it is said to be.
This script gives me a consistent start for a new project, with my standard logging, utilities, and other things I rely on and would otherwise copy and paste from previous projects.
Probably like all devs I'm wondering what my future holds now that AI is meant to be able to code like a dev guru mainlining sugary beverages. I'm dipping my toe in with Windsurf and Cascade. Should I be thinking about a new career? Here's my experience so far.
We've probably all made a mouse-driven selection rect. But what about when the layer has a transform applied - maybe it was dragged, or perhaps scaled at a point via the mouse wheel. But now the rect is all wrong. How to fix that...
Your app allows zooming and panning and now you need to find the center of the current canvas view to add a new shape. How do you do that...
Your UI needs some way to let the user defocus from some selected element, maybe hiding the transformer or closing a popup. How to do that easily?
I was fiddling with a simple toolbar when I changed the scale to 2x. Suddenly my toolbar is huge - not what I needed. So how to keep one shape at 1:1 scale while all around it change their size? Read on...