michal-szepielak / 9patch-viewer

Preview your NinePatches and check how it will behave during resize
MIT License
3 stars 0 forks source link

Not able to use demo site #2

Open jpriebe opened 6 years ago

jpriebe commented 6 years ago

I love the idea of this -- I have yet to find a convenient way to take a 9-patch and see how it will look on a variety of screen sizes. Your tool looks promising. But I'm getting an error when I try to drag a 9-patch into it:

normalize.css Failed to load resource: the server responded with a status of 404 (Not Found)
app.min.js:1 Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0.
    at c.getGridInfo (http://9patch-viewer.szepielak.com/js/app.min.js:1:6244)
    at c.createPreviewFromImage (http://9patch-viewer.szepielak.com/js/app.min.js:1:5992)
    at new c (http://9patch-viewer.szepielak.com/js/app.min.js:1:5532)
    at r.onImageLoad (http://9patch-viewer.szepielak.com/js/app.min.js:1:10075)
    at e (http://9patch-viewer.szepielak.com/js/app.min.js:1:527)
normalize.css Failed to load resource: the server responded with a status of 404 (Not Found)
michal-szepielak commented 6 years ago

Hi @jpriebe my apologies for the slow reply, but I probably somehow I must missed notification about this issue.

I see that uploading 9patch by drag cause the error. I'll look into it. Before that please try to hit the button and choose file from disk - this one should work better.