MattKetmo / darkroomjs

Extensible image editing tool in your browser
https://mattketmo.github.io/darkroomjs
MIT License
1.42k stars 405 forks source link

Empty canvas, empty crob, no image #129

Open wimurk opened 5 years ago

wimurk commented 5 years ago

Like the title says, only the toolbar is working!

image

The error log is clean. No errors are showen. Don't know where to start.

My code is just copied from the demo page.

new Darkroom('#cropper', {
            // Canvas initialization size
            minWidth: 100,
            minHeight: 100,
            maxWidth: 500,
            maxHeight: 500,

            // Plugins options
            plugins: {
                crop: {
                    minHeight: 50,
                    minWidth: 50,
                    ratio: 1
                },
                save: false // disable plugin
            },

            // Post initialization method
            initialize: function () {
                // Active crop selection
                this.plugins['crop'].requireFocus();

                // Add custom listener
                this.addEventListener('core:transformation', function () { /* ... */
                });
            }
        });

Also the html is copied from the demo page.

wimurk commented 5 years ago

Update: The toolbar works and i can even crop something. Its empty so i don't know what. image

When i click the save button it gives the following error VM21716:1 Uncaught TypeError: Cannot read property 'getTop' of null at child.cropCurrentZone (<anonymous>:1:23284)