group each plugin in its own folder

This commit is contained in:
jfh
2020-09-06 08:32:10 +02:00
parent caa4fe38cc
commit cfb3620d3a
322 changed files with 519 additions and 956 deletions

View File

@@ -0,0 +1,11 @@
function asyncGeneratorStep(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}
/**
* @file ext-eyedropper.js
*
* @license MIT
*
* @copyright 2010 Jeff Schiller
*
*/
var e={name:"eyedropper",init:function init(e){var t=this;return function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)}))}}(regeneratorRuntime.mark((function _callee(){var r,n,o,i,a,s,c,l,u,p;return regeneratorRuntime.wrap((function _callee$(d){for(;;)switch(d.prev=d.next){case 0:return u=function _getStyle(e){if("eyedropper"!==s.getMode()){var t=i("#tool_eyedropper"),r=null;e.multiselected||!e.elems[0]||["svg","g","use"].includes(e.elems[0].nodeName)?t.addClass("disabled"):(r=e.elems[0],t.removeClass("disabled"),l.fillPaint=r.getAttribute("fill")||"black",l.fillOpacity=r.getAttribute("fill-opacity")||1,l.strokePaint=r.getAttribute("stroke"),l.strokeOpacity=r.getAttribute("stroke-opacity")||1,l.strokeWidth=r.getAttribute("stroke-width"),l.strokeDashArray=r.getAttribute("stroke-dasharray"),l.strokeLinecap=r.getAttribute("stroke-linecap"),l.strokeLinejoin=r.getAttribute("stroke-linejoin"),l.opacity=r.getAttribute("opacity")||1)}},r=t,d.next=4,import("./locale/".concat(r.curPrefs.lang,".js"));case 4:return n=d.sent,o=n.default,i=e.$,a=e.ChangeElementCommand,s=r.canvas,c=function addToHistory(e){s.undoMgr.addCommandToHistory(e)},l={fillPaint:"red",fillOpacity:1,strokePaint:"black",strokeOpacity:1,strokeWidth:5,strokeDashArray:null,opacity:1,strokeLinecap:"butt",strokeLinejoin:"miter"},p=[{id:"tool_eyedropper",icon:"eyedropper.png",type:"mode",events:{click:function click(){s.setMode("eyedropper")}}}],d.abrupt("return",{name:o.name,svgicons:"eyedropper-icon.xml",buttons:o.buttons.map((function(e,t){return Object.assign(p[t],e)})),selectedChanged:u,elementChanged:u,mouseDown:function mouseDown(e){if("eyedropper"===s.getMode()){var t=e.event.target;if(!["svg","g","use"].includes(t.nodeName)){var r={},n=function change(e,t,n){r[t]=e.getAttribute(t),e.setAttribute(t,n)};l.fillPaint&&n(t,"fill",l.fillPaint),l.fillOpacity&&n(t,"fill-opacity",l.fillOpacity),l.strokePaint&&n(t,"stroke",l.strokePaint),l.strokeOpacity&&n(t,"stroke-opacity",l.strokeOpacity),l.strokeWidth&&n(t,"stroke-width",l.strokeWidth),l.strokeDashArray&&n(t,"stroke-dasharray",l.strokeDashArray),l.opacity&&n(t,"opacity",l.opacity),l.strokeLinecap&&n(t,"stroke-linecap",l.strokeLinecap),l.strokeLinejoin&&n(t,"stroke-linejoin",l.strokeLinejoin),c(new a(t,r))}}}});case 9:case"end":return d.stop()}}),_callee)})))()}};export default e;
//# sourceMappingURL=ext-eyedropper.js.map

File diff suppressed because one or more lines are too long