Git Product home page Git Product logo

Comments (5)

Fuzzyma avatar Fuzzyma commented on July 29, 2024

Deselect the shape before removing? :D

from svg.select.js.

froid24 avatar froid24 commented on July 29, 2024

I thought of that, but that's not it...

selectedShape.resize('stop');
selectedShape.selectize(false, {deepSelect:true});
selectedShape.remove();

Still getting the same error message next time I try to select one of the remaining shapes.
It definitely has something to do with the select operation, because if I draw the shapes and then just remove one without selecting any shape first, it works (I can further select other shapes). But once I select a shape and remove THAT specific shape, it breaks (if I remove a shape that was not selectized yet and remove it, it continues to work ok).

Any ideas or a quickfix? Thanks!

from svg.select.js.

Fuzzyma avatar Fuzzyma commented on July 29, 2024

I am pretty sure this plugin isnt the error here. Please debug the code on your end (dont use minified code!). I could be wrong ofc but with what I have on information it should work as it is.

From looking at the stacktrace it looks like your old shape is again selected and deselected even though its already removed?

from svg.select.js.

froid24 avatar froid24 commented on July 29, 2024

Arrrrghhh... you are right...
That last remark helped me find the error in my code (wrong way to empty a shape pointer).

Many thanks for the help, @Fuzzyma !

from svg.select.js.

Fuzzyma avatar Fuzzyma commented on July 29, 2024

Sometimes I think I am a wizard :D

from svg.select.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.