-
-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabled absolute positionning of the cloned node #45
Conversation
Codecov Report
@@ Coverage Diff @@
## master #45 +/- ##
==========================================
+ Coverage 96.06% 96.15% +0.08%
==========================================
Files 4 4
Lines 229 234 +5
Branches 40 41 +1
==========================================
+ Hits 220 225 +5
Misses 4 4
Partials 5 5
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thank you!
Would you also be able to add a basic integration test for the functionality you added?
- create a new component in the test file like this
- apply the layout changes from this commit
- Prefix the CSS transform property with
-webkit-
so it works - use the new option to position the element absolutely
- finally add a test that asserts that the position of the ghost element is correct. You can access the ghost element and assert its styles like this
src/resizable.directive.ts
Outdated
@@ -213,6 +232,11 @@ export class Resizable implements OnInit, OnDestroy, AfterViewInit { | |||
@Input() resizeCursorPrecision: number = 3; | |||
|
|||
/** | |||
* If we want to position cloned node with absolute position | |||
*/ | |||
@Input() enableAbsolutePositioning: boolean = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make this more verbose, can you rename this to
@Input() ghostElementPositioning: 'fixed' | 'absolute' = 'fixed';
Looks great to me, thank you! 😀 Will merge and cut a new release as soon as I'm near a computer. |
Sorry about the delay, released as 0.8.0 🎉 |
Hello,
We find an issue when using enableGhostResizing in a specific case when we have a container wich contain the element and a scale3D on it.
The cloned element will not be at the same place.
Here is a fix for it.