-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add resize handlers to sides of widgets #394
base: develop
Are you sure you want to change the base?
Add resize handlers to sides of widgets #394
Conversation
@@ -145,6 +145,7 @@ | |||
dragboardCover.style.top = "0"; | |||
dragboardCover.style.left = "0"; | |||
dragboardCover.style.width = "100%"; | |||
dragboardCover.style.cursor = handleElement.dataset.cursor; |
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 keep the cursor when resizing, I need a way to pass the cursor type to the cover. This solution might not be the cleanest but I found that better than passing it through 3 levels
right: 34px; | ||
cursor: s-resize; | ||
} | ||
.wc-widget { |
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.
just nested the resize elements
cursor: se-resize; | ||
} | ||
|
||
.wc-right-side-resize-handle { |
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.
and new styles for the side handlers
@@ -2,6 +2,7 @@ | |||
<div class="fade panel panel-default"> | |||
<div class="wc-widget-heading panel-heading"><h4 class="panel-title"><t:title/></h4><div class="wc-widget-infobuttons"><t:errorbutton/></div><div class="wc-widget-buttons"><t:minimizebutton/><t:menubutton/><t:closebutton/></div></div> | |||
<div class="wc-widget-body"><t:iframe/></div> | |||
<t:leftsideresizehandle/><t:rightsideresizehandle/> |
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.
I put them outside the body because the body has overflow: hidden
so the 6px outside would not work. This seems to work pretty well
@@ -93,7 +93,6 @@ | |||
} | |||
|
|||
.wc-widget-footer { | |||
height: 3px; |
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.
From what I can see this is not necessary and only creates a white border at the bottom
Feature to allow widgets to be resized from the sides as well.