Skip to content

Commit

Permalink
Fix changing dimensions after dragging element
Browse files Browse the repository at this point in the history
[Issue] #213
[Problem] Element after dragging has absolute position which
          may interfere it's dimensions.
[Solution] Store element width and height before starting
           dragging

Signed-off-by: Pawel Kaczmarczyk <p.kaczmarczy@samsung.com>
  • Loading branch information
pkaczmarczy authored and lmslachciak committed Jul 22, 2019
1 parent 27c50c9 commit 20855fe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions design-editor/src/pane/interaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,13 @@ class Interaction {
height: $contentElement.outerHeight()
};

// store element width and height, because of dragging changes
// positioning type and element may lost it's dimensions
$contentElement.css({
'width': $contentElement.css('width'),
'height': $contentElement.css('height')
});

$selectLayerParent[0].showHighlighter($contentElement.parent()[0]);

// Make parent offset root if it's not already
Expand Down

0 comments on commit 20855fe

Please sign in to comment.