polotno-project / polotno-board

Roadmap and bug-tracker for the Polotno project.
https://polotno.dev/
9 stars 1 forks source link

Dragging an svg element replaces the locked image layer #37

Closed iamsterdam800 closed 1 year ago

iamsterdam800 commented 2 years ago

My design template has a full-size image layer in the background. This layer is also locked to prevent changes. When a user drags a new (svg) element to place on the canvas, Polotno replaces the background layer with the new element. Even though the layer is locked. This makes it impossible for the user to grag an element from the side bar to the desired location on the canvas.

Would it be possible to fix this, so that when drag-and-dropping an element over a locked layer, it will not replace that layer, but will add the element over it? Or if there's another way to signal to Polotno which layers should not be replaced on drag and drop.

lavrton commented 2 years ago

That looks like a bad behavior and should be fixed. Can your users unlock such element? As another solution, you may set "selectable: false" for that element. Users will be unable to replace the content.

iamsterdam800 commented 2 years ago

There are no real users (yet), as the project is in development. :) At the moment the layer locking feature is enabled in the UI. I might remove it later, or will keep it in.

Regarding the temporary solution, I think it will work for now. Though I also have one svg layer, where a user can change the color, so it has to be selectable. But it looks like the issue is only affecting image layers and not svg. So for the background image layer, selectable:false will work for now as a workaround.