fix issue with clone layer
parent
627092f264
commit
91e61503b6
|
@ -82,14 +82,6 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
|
||||||
// Make sure shape uses absolute values
|
|
||||||
if ((/[a-z]/).test(currentD)) {
|
|
||||||
currentD = curLib.data[curShapeId] = canv.pathActions.convertPath(curShape);
|
|
||||||
curShape.setAttribute('d', currentD);
|
|
||||||
canv.pathActions.fixEnd(curShape);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
curShape.setAttribute('transform', 'translate(' + x + ',' + y + ') scale(0.005) translate(' + -x + ',' + -y + ')');
|
curShape.setAttribute('transform', 'translate(' + x + ',' + y + ') scale(0.005) translate(' + -x + ',' + -y + ')');
|
||||||
|
|
||||||
canv.recalculateDimensions(curShape);
|
canv.recalculateDimensions(curShape);
|
||||||
|
|
|
@ -11,7 +11,7 @@ class LayersPanel {
|
||||||
* @param {PlainObject} editor
|
* @param {PlainObject} editor
|
||||||
*/
|
*/
|
||||||
constructor(editor) {
|
constructor(editor) {
|
||||||
this.updateContextPanel = editor.topPanel.updateContextPanel;
|
this.updateContextPanel = editor.topPanel.updateContextPanel.bind(editor.topPanel);
|
||||||
this.editor = editor;
|
this.editor = editor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import { isWebkit } from '../common/browser.js';
|
|
||||||
import { convertPath } from './path.js';
|
|
||||||
import { preventClickDefault } from './utilities.js';
|
import { preventClickDefault } from './utilities.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -19,13 +17,6 @@ export const copyElem = function (el, getNextId) {
|
||||||
newEl.removeAttribute('id');
|
newEl.removeAttribute('id');
|
||||||
newEl.id = getNextId();
|
newEl.id = getNextId();
|
||||||
|
|
||||||
// Opera's "d" value needs to be reset for Opera/Win/non-EN
|
|
||||||
// Also needed for webkit (else does not keep curved segments on clone)
|
|
||||||
if (isWebkit() && el.nodeName === 'path') {
|
|
||||||
const fixedD = convertPath(el);
|
|
||||||
newEl.setAttribute('d', fixedD);
|
|
||||||
}
|
|
||||||
|
|
||||||
// now create copies of all children
|
// now create copies of all children
|
||||||
el.childNodes.forEach(function(child){
|
el.childNodes.forEach(function(child){
|
||||||
switch (child.nodeType) {
|
switch (child.nodeType) {
|
||||||
|
|
Loading…
Reference in New Issue