svgedit/dist/editor/extensions/ext-panning/ext-panning.js

11 lines
41 KiB
JavaScript
Raw Normal View History

V7 preview (#480) * #issue-fix The new menu will ask if you want to erase the current content but it will ignore the answer * #issue-fix dialog needs to be closer than the original * #issue-fix main menu alignment changes * #issue_fix double click and opensvg issue fixed * #issue-fix process_cancel change to seConfirm * #issue-fix review how the top toolbar display when many buttons are displayed * #issue-fix unwanted css reoved * #issue-fix BOTTOM TOOLS Make sure all features of the bottom toolbar are working * #issue-fix IMPORT IMAGE menu open issue fixed * #issue-fix alert dialog overwrite style * #issue-fix lint issue fixed * npm update + associated fixes * #36 look of opacity button should like the zoom button (without the dropdown button) * #37 Clicking anywhere on the bottom bar (for example below the opacity button is displaying the “color popup”.) * #38 The opacity button does not update with the current element * #42 When you import an image, it works well but the dialog should disappear automatically * Fixes #53: 4th option for the background display fixed * Fixes #53: 4th option for the background fixed * #49 the x button does not work * Fixes #41: Alignment fixes in bottom bar * fix test scenario * #39 opacity button/stroke size/radius button don’t allow the 0 value * #41 The look and alignment of stroke size and stroke style should be consistent with the rest of the bottom bar. * #44 Text font dropdown is broken * #52 Fix the export * Fixes #44: Text font dropdown fixed * Fixes #44: Text font dropdown fixed * Fixes #44: Text font dropdown fixed * Fixes #44: Text font dropdown fixed * Update index.html * update husky * fixes * moves from index.html to js * fix #66 * fix #48 first set of new icons * Reorganize tools in left panel to be more intuitive * Update button styles to adapt to new icons * Fix #48 new set of icons for alignments * Variabilisation of icon bkgd colors Update of color choice to fit new icons design * Update canvas and rulers colors * Improve layer handle design * Modernize SVG Logo but keeping original spirit * Fix #48 continue improve icons * Continue to reorganise left panel * Update right panel handle for layers * Fix #48 new set of icons for main menu * Improve main menu design * Rework menu organisation * Rework menu organisation * Update input element design * New icons * Improve Zoom Module * Improve Color Picker Module * New icons * New icons * #65 restore the feature of start/end marker lines partially did * #64 The export dialog needs to include the quality options (except for PDF) * #39 opacity button/stroke size/radius button don’t allow the 0 value * #39 eslint changes * #69 menu button style overwrite * #65 restore the feature of start/end marker lines * #43 With a small window, the look of the top toolbar is broken * #43 tool top alignment revert * #46 Move this jQuery component to a web component for graduate and picker components * #46 Move this jQuery component to a web component * remove some non standard lint rules * #46 picker convert as pure javascript changes * #46 jquery plugin convert to pure javascript * #46 jquery plugin change to pure javascript * #46 jquery remove and convert to pure javascript * #46 slider issue fixed * #46 ColorValuePicker and js convertion * #46 globals $ remov from slider class * #46 jquery convert pure javascript changes * #46 jquery to js convertion changes * #46 paintbox and current element color set issue fixed * #46 unwanted files removed * #46 $.extend modify changes * #46 extend modifiey changes * #46 $.extend change to pure javascript * #46 extend and data changes * #46 jquery removed * #45 These buttons don't work and dropdown is broken * #45 These buttons don't work and dropdown is broken * #45 These buttons don't work and dropdown is broken commit reverted * #43 With a small window, the look of the top toolbar is broken * Update jQuery.jPicker.js * #76 draggable modification changes * #76 jquery-ui-1.8.17.custom.min.js removed from editor * #76 jquery ui file removed * npm update * #77 console issue fixed * #77 <SVG> button issue fixed * #77 shortkey issue fixed * #77 jquery hotkeys plugin changes * #77 hotkey plugin related changes * #78 hotkey related code comment. * #78 js-hotkeys/jquery.hotkeys.min.js file removed from svgedit.js * #51 Rewrite the color palette without elix * #81 unwanted files removed * #81 folder name renamed * #81 folder rename changes * #81 jquery-ui folder renamed * #81 jquery modify changes * #81 globals $ removed Co-authored-by: Agriya Dev5 <agriya.dev5@agriya.in> Co-authored-by: mathieucura <mathieu@optimistik.fr>
2021-03-05 11:45:07 +00:00
var fails=function(t){try{return!!t()}catch(t){return!0}},t=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(t){var e={exports:{}};return t(e,e.exports),e.exports}var check=function(t){return t&&t.Math==Math&&t},r=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof e&&e)||function(){return this}()||Function("return this")(),isObject=function(t){return"object"==typeof t?null!==t:"function"==typeof t},n=r.document,o=isObject(n)&&isObject(n.createElement),documentCreateElement=function(t){return o?n.createElement(t):{}},i=!t&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),anObject=function(t){if(!isObject(t))throw TypeError(String(t)+" is not an object");return t},toPrimitive=function(t,e){if(!isObject(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!isObject(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!isObject(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!isObject(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},c=Object.defineProperty,a={f:t?c:function defineProperty(t,e,r){if(anObject(t),e=toPrimitive(e,!0),anObject(r),i)try{return c(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},u=a.f,f=Function.prototype,s=f.toString,l=/^\s*function ([^ (]*)/;t&&!("name"in f)&&u(f,"name",{configurable:!0,get:function(){try{return s.call(this).match(l)[1]}catch(t){return""}}});var createPropertyDescriptor=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},p=t?function(t,e,r){return a.f(t,e,createPropertyDescriptor(1,r))}:function(t,e,r){return t[e]=r,t},setGlobal=function(t,e){try{p(r,t,e)}catch(n){r[t]=e}return e},h=r["__core-js_shared__"]||setGlobal("__core-js_shared__",{}),y=createCommonjsModule((function(t){(t.exports=function(t,e){return h[t]||(h[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.8.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),v={}.hasOwnProperty,has=function(t,e){return v.call(t,e)},d=0,g=Math.random(),uid=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++d+g).toString(36)},m=!!Object.getOwnPropertySymbols&&!fails((function(){return!String(Symbol())})),b=m&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,w=y("wks"),S=r.Symbol,O=b?S:S&&S.withoutSetter||uid,wellKnownSymbol=function(t){return has(w,t)||(m&&has(S,t)?w[t]=S[t]:w[t]=O("Symbol."+t)),w[t]},j={};j[wellKnownSymbol("toStringTag")]="z";var x="[object z]"===String(j),E=Function.toString;"function"!=typeof h.inspectSource&&(h.inspectSource=function(t){return E.call(t)});var P,_,T,A=h.inspectSource,L=r.WeakMap,k="function"==typeof L&&/native code/.test(A(L)),I=y("keys"),sharedKey=function(t){return I[t]||(I[t]=uid(t))},M={},G=r.WeakMap;if(k){var C=h.state||(h.state=new G),R=C.get,N=C.has,D=C.set;P=function(t,e){return e.facade=t,D.call(C,t,e),e},_=function(t){return R.call(C,t)||{}},T=function(t){return N.call(C,t)}}else{var U=sharedKey("state");M[U]=!0,P=function(t,e){return e.facade=t,p(t,U,e),e},_=function(t){return has(t,U)?t[U]:{}},T=function(t){return has(t,U)}}var W={set:P,get:_,has:T,enforce:function(t){return T(t)?_(t):P(t,{})},getterFor:function(t){return function(e){var r;if(!isObject(e)||(r=_(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},z=createCommonjsModule((function(t){var e=W.get,n=W.enforce,o=String(String).split("String");(t.exports=function(t,e,i,c){var a,u=!!c&&!!c.unsafe,f=!!c&&!!c.enumerable,s=!!c&&!!c.noTargetGet;"function"==typeof i&&("string"!=typeof e||has(i,"name")||p(i,"name",e),(a=n(i)).source||(a.source=o.join("string"==typeof e?e:""))),t!==r?(u?!s&&t[e]&&(f=!0):delete t[e],f?t[e]=i:p(t,e,i)):f?t[e]=i
2020-09-10 06:24:38 +00:00
/**
2020-09-11 23:27:47 +00:00
* @file ext-panning.js
*
2020-09-10 06:24:38 +00:00
* @license MIT
*
2020-09-11 23:27:47 +00:00
* @copyright 2013 Luis Aguirre
2020-09-10 06:24:38 +00:00
*
V7 preview (#480) * #issue-fix The new menu will ask if you want to erase the current content but it will ignore the answer * #issue-fix dialog needs to be closer than the original * #issue-fix main menu alignment changes * #issue_fix double click and opensvg issue fixed * #issue-fix process_cancel change to seConfirm * #issue-fix review how the top toolbar display when many buttons are displayed * #issue-fix unwanted css reoved * #issue-fix BOTTOM TOOLS Make sure all features of the bottom toolbar are working * #issue-fix IMPORT IMAGE menu open issue fixed * #issue-fix alert dialog overwrite style * #issue-fix lint issue fixed * npm update + associated fixes * #36 look of opacity button should like the zoom button (without the dropdown button) * #37 Clicking anywhere on the bottom bar (for example below the opacity button is displaying the “color popup”.) * #38 The opacity button does not update with the current element * #42 When you import an image, it works well but the dialog should disappear automatically * Fixes #53: 4th option for the background display fixed * Fixes #53: 4th option for the background fixed * #49 the x button does not work * Fixes #41: Alignment fixes in bottom bar * fix test scenario * #39 opacity button/stroke size/radius button don’t allow the 0 value * #41 The look and alignment of stroke size and stroke style should be consistent with the rest of the bottom bar. * #44 Text font dropdown is broken * #52 Fix the export * Fixes #44: Text font dropdown fixed * Fixes #44: Text font dropdown fixed * Fixes #44: Text font dropdown fixed * Fixes #44: Text font dropdown fixed * Update index.html * update husky * fixes * moves from index.html to js * fix #66 * fix #48 first set of new icons * Reorganize tools in left panel to be more intuitive * Update button styles to adapt to new icons * Fix #48 new set of icons for alignments * Variabilisation of icon bkgd colors Update of color choice to fit new icons design * Update canvas and rulers colors * Improve layer handle design * Modernize SVG Logo but keeping original spirit * Fix #48 continue improve icons * Continue to reorganise left panel * Update right panel handle for layers * Fix #48 new set of icons for main menu * Improve main menu design * Rework menu organisation * Rework menu organisation * Update input element design * New icons * Improve Zoom Module * Improve Color Picker Module * New icons * New icons * #65 restore the feature of start/end marker lines partially did * #64 The export dialog needs to include the quality options (except for PDF) * #39 opacity button/stroke size/radius button don’t allow the 0 value * #39 eslint changes * #69 menu button style overwrite * #65 restore the feature of start/end marker lines * #43 With a small window, the look of the top toolbar is broken * #43 tool top alignment revert * #46 Move this jQuery component to a web component for graduate and picker components * #46 Move this jQuery component to a web component * remove some non standard lint rules * #46 picker convert as pure javascript changes * #46 jquery plugin convert to pure javascript * #46 jquery plugin change to pure javascript * #46 jquery remove and convert to pure javascript * #46 slider issue fixed * #46 ColorValuePicker and js convertion * #46 globals $ remov from slider class * #46 jquery convert pure javascript changes * #46 jquery to js convertion changes * #46 paintbox and current element color set issue fixed * #46 unwanted files removed * #46 $.extend modify changes * #46 extend modifiey changes * #46 $.extend change to pure javascript * #46 extend and data changes * #46 jquery removed * #45 These buttons don't work and dropdown is broken * #45 These buttons don't work and dropdown is broken * #45 These buttons don't work and dropdown is broken commit reverted * #43 With a small window, the look of the top toolbar is broken * Update jQuery.jPicker.js * #76 draggable modification changes * #76 jquery-ui-1.8.17.custom.min.js removed from editor * #76 jquery ui file removed * npm update * #77 console issue fixed * #77 <SVG> button issue fixed * #77 shortkey issue fixed * #77 jquery hotkeys plugin changes * #77 hotkey plugin related changes * #78 hotkey related code comment. * #78 js-hotkeys/jquery.hotkeys.min.js file removed from svgedit.js * #51 Rewrite the color palette without elix * #81 unwanted files removed * #81 folder name renamed * #81 folder rename changes * #81 jquery-ui folder renamed * #81 jquery modify changes * #81 globals $ removed Co-authored-by: Agriya Dev5 <agriya.dev5@agriya.in> Co-authored-by: mathieucura <mathieu@optimistik.fr>
2021-03-05 11:45:07 +00:00
*/createCommonjsModule((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var o=e&&e.prototype instanceof Generator?e:Generator,i=Object.create(o.prototype),c=new Context(n||[]);return i._invoke=function makeInvokeMethod(t,e,r){var n=u;return function invoke(o,i){if(n===s)throw new Error("Generator is already running");if(n===l){if("throw"===o)throw i;return doneResult()}for(r.method=o,r.arg=i;;){var c=r.delegate;if(c){var a=maybeInvokeDelegate(c,r);if(a){if(a===p)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===u)throw n=l,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=s;var h=tryCatch(t,e,r);if("normal"===h.type){if(n=r.done?l:f,h.arg===p)continue;return{value:h.arg,done:r.done}}"throw"===h.type&&(n=l,r.method="throw",r.arg=h.arg)}}}(t,r,c),i}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var u="suspendedStart",f="suspendedYield",s="executing",l="completed",p={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var h={};h[i]=function(){return this};var y=Object.getPrototypeOf,v=y&&y(y(values([])));v&&v!==r&&n.call(v,i)&&(h=v);var d=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(h);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){var r;this._invoke=function enqueue(o,i){function callInvokeWithMethodAndArg(){return new e((function(r,c){!function invoke(r,o,i,c){var a=tryCatch(t[r],t,o);if("throw"!==a.type){var u=a.arg,f=u.value;return f&&"object"===_typeof(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){invoke("next",t,i,c)}),(function(t){invoke("throw",t,i,c)})):e.resolve(f).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,c)}))}c(a.arg)}(o,i,r,c)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,maybeInvokeDelegate(t,r),"throw"===r.method))return p;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var o=tryCatch(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,p;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,p):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,c=function next(){for(;++o<t.length;)if(n.call(t,o))return next.value=t[o],next.done=!1,next;return next.value=e,next.done=!0,next};return c.next=c}}return{next:doneResult}}function doneResult(){return{value:e,done:!0}}return GeneratorFunction.prototype=d.constructor=GeneratorFunctionPrototype,GeneratorFunctionPrototype.constructor=GeneratorFunction,GeneratorFunction.displayName=define(GeneratorFunctionPrototype,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFuncti
2020-09-10 06:24:38 +00:00
//# sourceMappingURL=ext-panning.js.map