To stop dragging lines that have been made, set the move parameter of the Pen to false.
Usually, we use the MotionController with the Pen. Use the pressmove
new MotionController({
target:new Pen().addTo(),
type:"pressmove",
damp:.5, // pen has damp too so can up this number
speed:20
});
See the methods here https://zimjs.com/docs.html?item=Pen for doing things with the drawings like clearing etc. You can also double click or press hold lines to delete them.
Can a pen write on a page? This code doesn't work on the page but does on the stage?
const page1 = new Page(800,600, blue).addTo();
const pen = new Pen().addTo(page1).center();
const motionController = new MotionController({
target:pen,
type:"pressmove",
speed:60,
damp:.5,
mouseMoveOutside:true
});