artursapek / mondrian

Web-based vector graphics editor
MIT License
1.24k stars 104 forks source link

Master build.js init error. #39

Closed Fishrock123 closed 10 years ago

Fishrock123 commented 10 years ago

master @ c7b75a2056afdcef2b9e9ccacd3d2746d8894778 fails to init when built.

Here's a screenshot of my web inspector.

screen shot 2014-02-04 at 12 51 52 pm

artursapek commented 10 years ago

The same commit seems to work on prod, which probably means this is a state issue. Especially since UIState is an unfinished class that I was working on in November. It's meant to maintain things like your canvas position, zoom level, current tool, colors, etc between refreshes. Not surprised there's a bug in it. :p

Are you able to get around it?

Fishrock123 commented 10 years ago

I guess I'll just comment it out? I have no idea what its tied to.

Fishrock123 commented 10 years ago

Oh. Uhhhh..

screen shot 2014-02-04 at 1 52 47 pm

Between refreshes you say? I'll just clear my LocalStorage then.

artursapek commented 10 years ago

Yes, it's the same attribute. Your app somehow got into the state where it thinks you have no tool selected, and the class (unfinished, like I said) can't handle that. This is all persisted to localStorage so you won't be able to refresh your way out of it. Just write a handler to default to selecting the cursor in this case and call it good.

Fishrock123 commented 10 years ago

Closing this. We'll open a new one for state robustness later.