diff --git a/src/shapes/Cut/Cut.js b/src/shapes/Cut/Cut.js index 4a73025..66b778e 100644 --- a/src/shapes/Cut/Cut.js +++ b/src/shapes/Cut/Cut.js @@ -122,7 +122,7 @@ export class Cut extends joint.dia.Element { } cut.embed(child) if (hasparent) { - cut.sheet.treeResize(cut, cut.attributes.attrs.rect.width / 2); + cut.sheet.treeResize(cut, 40); } } //console.log(cut); diff --git a/src/util/proof-util.js b/src/util/proof-util.js index cda47f4..c99809c 100644 --- a/src/util/proof-util.js +++ b/src/util/proof-util.js @@ -31,15 +31,14 @@ export const insertDoubleCut = function(sheet, model, mousePosition={}) { let size = {} if (!model && mousePosition) { position = mousePosition; - size = { width: 80, height: 80 } } else if (model){ position = model.get('position'); - size = { width: model.attr('rect/width'), height: model.attr('rect/height') } } else { throw new Error('Bad arguments'); } + size = { width: 80, height: 80 } const multipliers = [0.8, 0.25]; let new_cuts = [] for(let i = 0; i < multipliers.length; i++) {