Changes:
- Widget dragging was broken when selecting the root - sidepanel toggle doens't trig root selection in editor anymore - Push/toggle style update
This commit is contained in:
parent
ac84dfcdc6
commit
5c3cbe0162
5 changed files with 10 additions and 12 deletions
|
|
@ -224,6 +224,10 @@ var editSession = function(container,data,refresh){
|
|||
|
||||
if (!refresh && $('.editor-root').hasClass('editing')) return
|
||||
|
||||
$('.widget.ui-resizable').resizable('destroy')
|
||||
$('.widget.ui-draggable').draggable('destroy').find('.ui-draggable-handle').remove()
|
||||
|
||||
|
||||
$('.editing').removeClass('editing')
|
||||
$('.editor-root, #container').addClass('editing')
|
||||
|
||||
|
|
|
|||
|
|
@ -102,9 +102,9 @@ var sidepanel = function(data){
|
|||
}(data)
|
||||
|
||||
var toggle = function(){
|
||||
$(`<a id="open-toggle">${icon('navicon')}</a>`).appendTo('#container').click(function(){
|
||||
$(`<a id="open-toggle">${icon('navicon')}</a>`).appendTo('#container').click(function(e){
|
||||
$('#open-toggle, #sidepanel, #container').toggleClass('sidepanel-open')
|
||||
})
|
||||
}).on('mousedown touchstart',function(e){e.stopPropagation()})
|
||||
|
||||
// in case where are hot loading a session
|
||||
if ($('#sidepanel').hasClass('sidepanel-open')) {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ module.exports.create = function(widgetData,container) {
|
|||
|
||||
var widget = $(`
|
||||
<div class="push toggle">
|
||||
<div class="light"></div>
|
||||
</div>\
|
||||
`),
|
||||
$document = $(document)
|
||||
|
|
@ -59,10 +58,7 @@ module.exports.create = function(widgetData,container) {
|
|||
var on = widgetData.on,
|
||||
off= widgetData.off
|
||||
if (v==on) {
|
||||
widget.addClass('on').removeClass('ripple').addClass('ripple').delay(250).queue(function(next){
|
||||
widget.removeClass('ripple')
|
||||
next()
|
||||
})
|
||||
widget.addClass('on')
|
||||
if (send) widget.sendValue(v)
|
||||
} else if (v==off) {
|
||||
widget.removeClass('on')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue