Palette floater canvas size fix
This commit is contained in:
@@ -553,14 +553,13 @@ export class Palette implements OnInit, OnDestroy, OnChanges {
|
||||
});
|
||||
|
||||
// Only node view expected
|
||||
const view = this.floaterpaper.findViewByModel(floaternode);
|
||||
let box: dia.BBox = (<dia.ElementView>view).getBBox();
|
||||
this.viewBeingDragged = this.floaterpaper.findViewByModel(floaternode);
|
||||
let box: dia.BBox = (<dia.ElementView>this.viewBeingDragged).getBBox();
|
||||
let size: dia.Size = floaternode.get('size');
|
||||
parent.css('width', size.width + 10);
|
||||
parent.css('height', size.height + 10);
|
||||
parent.css('width', box.width + box.width - size.width);
|
||||
parent.css('height', box.height + box.height - size.height);
|
||||
// Account for node real size including ports
|
||||
floaternode.translate(box.width - size.width, box.height - size.height);
|
||||
this.viewBeingDragged = this.floaterpaper.findViewByModel(floaternode);
|
||||
parent.offset({left: event.pageX + 5, top: event.pageY + 5});
|
||||
} else {
|
||||
$('#palette-floater').offset({left: event.pageX + 5, top: event.pageY + 5});
|
||||
|
||||
Reference in New Issue
Block a user