Giter Site home page Giter Site logo

Comments (4)

eimlaymaire avatar eimlaymaire commented on September 14, 2024

Update: So it looks like when you draw on a decoded drawing, the append(shape:) method gets called in Drawing, but the new shape doesn't appear in the drawing's shapes array. I haven't been able to figure out why, so instead i just made a hacky fix.

If anyone's having the same problem, here's what I did to temporarily solve it: Overlay 2 drawsana views, decode your saved drawing into the background drawsana view, and let the user interact with the foreground one. Then, when you want to save your edits, merge the shapes of the 2 drawsana view drawings into a new Drawing, and encode.

from drawsana.

stevelandeyasana avatar stevelandeyasana commented on September 14, 2024

Thanks for taking the time to report and investigate this issue. Serialization isn't well-tested and I'm sorry you ran into a bug. As you can probably tell, time to work on this project is short and I hope to be able to give it a deeper look soon.

from drawsana.

stevelandeyasana avatar stevelandeyasana commented on September 14, 2024

I have another possibility for the root cause of this bug. Could it be that you're hanging onto the old Drawing instance somewhere? I just noticed that for example the active tool isn't informed if the Drawing instance changes.

from drawsana.

stevelandeyasana avatar stevelandeyasana commented on September 14, 2024

There was a bug in the library where the drawingOperationStack would never be updated with the new Drawing instance. That would probably cause the symptoms you described.

from drawsana.

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.