jodit-pro
Version:
PRO Version of Jodit Editor
2 lines (1 loc) • 711 B
JavaScript
var n=Object.defineProperty;var c=(e,o)=>n(e,"name",{value:o,configurable:!0});import{arrayToPath as p}from"../../../helpers/helpers.js";function m(e,o,i=!1){const t=this.mapElements[o];if(t.state===e||t.state.type!==e.type)return;const r=t.state;if(!i){let s;for(s in e){const a=e[s],l=r[s];if(a!=null&&(l==null||a.toString()!==l.toString()))switch(s){case"strokeWeight":case"strokeColor":case"fillColor":case"fillOpacity":switch(t.type){case"polyline":case"circle":case"polygon":{t.gme.setOptions({[s]:a});break}}break;case"coordinates":switch(t.type){case"polygon":case"polyline":{t.gme.setPath(p(a));break}}break}}}t.state=e,this.state.elements[o]=e}c(m,"updateStateAndGme");export{m as updateStateAndGme};