View difference between Paste ID: 37hPqN0d and eA8m6dDb
SHOW: | | - or go back to the newest paste.
1
    init = function() {
2
        orig_src.onload = function(){
3-
        $cropMarker = $('#icCropMarker');
3+
4-
        console.log('Doesn\'t work:' + orig_src.width);
4+
5-
        setTimeout(function() {
5+
6-
             console.log('Works:' + orig_src.width);
6+
7-
        }, 500);
7+
8
            $cropMarker.on('mousedown touchstart', startResize);
9-
        $cropMarker.width('100%').height('100%');
9+
10-
        $cropMarker.on('mousedown touchstart', startResize);
10+
11-
        $cropMarker.on('mousedown touchstart', '#icMoveHandle', startMoving);
11+
12-
        $('#icCrop').on('click', crop);
12+
13-
        repositionOverlay();
13+
14-
    };
14+