diff --git a/src/editor/index.html b/src/editor/index.html index d84f064b..381caf75 100644 --- a/src/editor/index.html +++ b/src/editor/index.html @@ -108,10 +108,13 @@
- + +
- - + + + @@ -119,9 +122,11 @@
- +
- +
@@ -201,8 +213,10 @@
- - + + + +
@@ -211,12 +225,16 @@
- - + + + +
- - + + + +
@@ -243,7 +261,8 @@
- +
@@ -281,7 +300,8 @@ - + +
@@ -400,6 +420,8 @@
  • + +
    diff --git a/src/editor/svgedit.css b/src/editor/svgedit.css index 9ffdce45..c22f8f31 100644 --- a/src/editor/svgedit.css +++ b/src/editor/svgedit.css @@ -754,8 +754,6 @@ input[type=text] { margin-right: 5px; } #tool_opacity { right: 0;} -#tool_fill { left: 0; } -#tool_stroke { left: 60px;} #tool_opacity { overflow: visible; diff --git a/src/editor/svgedit.js b/src/editor/svgedit.js index 1650f2cd..48cd897a 100644 --- a/src/editor/svgedit.js +++ b/src/editor/svgedit.js @@ -957,7 +957,7 @@ editor.init = () => { const canvMenu = $('#cmenu_canvas'); const paintBox = {fill: null, stroke: null}; - let resizeTimer, curScrollPos; + let resizeTimer; let exportWindow = null, defaultImageURL = curConfig.imgPath + 'logo.svg', zoomInIcon = 'crosshair', @@ -3981,8 +3981,6 @@ editor.init = () => { hidePreferences(); }; - let resetScrollPos = $.noop; - /** * * @returns {Promise} Resolves to `undefined` @@ -4010,45 +4008,10 @@ editor.init = () => { } else if (preferences) { hidePreferences(); } - resetScrollPos(); }; const winWh = {width: $(window).width(), height: $(window).height()}; - // Fix for Issue 781: Drawing area jumps to top-left corner on window resize (IE9) - if (isIE()) { - resetScrollPos = function () { - if (workarea[0].scrollLeft === 0 && workarea[0].scrollTop === 0) { - workarea[0].scrollLeft = curScrollPos.left; - workarea[0].scrollTop = curScrollPos.top; - } - }; - - curScrollPos = { - left: workarea[0].scrollLeft, - top: workarea[0].scrollTop - }; - - $(window).resize(resetScrollPos); - editor.ready(function () { - // TODO: Find better way to detect when to do this to minimize - // flickering effect - return new Promise((resolve, reject) => { // eslint-disable-line promise/avoid-new - setTimeout(function () { - resetScrollPos(); - resolve(); - }, 500); - }); - }); - - workarea.scroll(function () { - curScrollPos = { - left: workarea[0].scrollLeft, - top: workarea[0].scrollTop - }; - }); - } - $(window).resize(function (evt) { $.each(winWh, function (type, val) { const curval = $(window)[type](); @@ -4073,29 +4036,6 @@ editor.init = () => { $('#change_image_url').click(promptImgURL); - // added these event handlers for all the push buttons so they - // behave more like buttons being pressed-in and not images - (function () { - const toolnames = [ - 'clear', 'open', 'save', 'delete', - 'delete_multi', 'paste', 'clone', 'clone_multi', - 'move_top', 'move_bottom' - ]; - const curClass = 'tool_button_current'; - - let allTools = ''; - - $.each(toolnames, function (i, item) { - allTools += (i ? ',' : '') + '#tool_' + item; - }); - - $(allTools).mousedown(function () { - $(this).addClass(curClass); - }).bind('mousedown mouseout', function () { - $(this).removeClass(curClass); - }); - }()); - /** * @param {external:jQuery} elem * @todo Go back to the color boxes having white background-color and then setting