mode resize handles !

This commit is contained in:
jean-emmanuel 2016-02-17 13:03:15 +01:00
parent 19387cd930
commit 27e64a8d33
3 changed files with 36 additions and 12 deletions

File diff suppressed because one or more lines are too long

View file

@ -60,14 +60,17 @@ enableEditor = function(){
}
var handleTarget
$('.widget.ui-resizable').resizable('destroy')
$(this).resizable({
handles:'se',
handles:'s, e, se',
helper: "ui-helper",
start: function(event, ui){
handleTarget = $(event.originalEvent.target);
},
stop: function( event, ui ) {
data.height = Math.max(ui.size.height,30)
data.width = Math.max(ui.size.width,30)
if (handleTarget.hasClass('ui-resizable-se') || handleTarget.hasClass('ui-resizable-s')) data.height = Math.max(ui.size.height,30)
if (handleTarget.hasClass('ui-resizable-se') || handleTarget.hasClass('ui-resizable-e')) data.width = Math.max(ui.size.width,30)
updateWidget()
},
snap:'.tab.on .widget, .tab.on',

View file

@ -734,16 +734,37 @@ a {
.ui-resizable-handle {
position: absolute;
bottom: 5rem;
right: 5rem;
width:15rem;
height:15rem;
border:2rem solid transparent;
border-right: 2rem solid $color-accent;
border-bottom: 2rem solid $color-accent;
z-index: 100000;
cursor: se-resize;
&.ui-resizable-se {
bottom: 5rem;
right: 5rem;
width:15rem;
height:15rem;
border-right: 2rem solid $color-accent;
border-bottom: 2rem solid $color-accent;
cursor: se-resize;
}
&.ui-resizable-e {
top: 50%;
margin-top:-7.5rem;
right: 5rem;
width:15rem;
height:15rem;
border-right: 2rem solid $color-accent;
cursor: e-resize;
}
&.ui-resizable-s {
bottom: 5rem;
left: 50%;
margin-left:-7.5rem;
width:15rem;
height:15rem;
border-bottom: 2rem solid $color-accent;
cursor: s-resize;
}
}
.ui-helper {
border: 1rem dashed $color-accent;
background: rgba($color-accent,.25);