- fixed plot/visualizer sync (check if subscribed widget is in global store, not in document, since tabs are buffered)
- removed button ripple effect entirely
This commit is contained in:
parent
1416867ae8
commit
43d72ac8a7
5 changed files with 13 additions and 29 deletions
File diff suppressed because one or more lines are too long
|
|
@ -94,12 +94,14 @@ module.exports.create = function(widgetData,container) {
|
|||
|
||||
})
|
||||
|
||||
$('body').on('sync',function(e,id,w){
|
||||
if (widget.linkedWidgets.indexOf(id)==-1 || !document.contains(widget[0])) return
|
||||
|
||||
widget.handleSync = function(e,id,w) {
|
||||
if (widget.linkedWidgets.indexOf(id)==-1 || !WIDGETS[id]) return
|
||||
widget.fetchValues()
|
||||
requestAnimationFrame(widget.draw)
|
||||
})
|
||||
}
|
||||
|
||||
$('body').on('sync',widget.handleSync)
|
||||
|
||||
widget.draw = function(){
|
||||
|
||||
|
|
|
|||
|
|
@ -57,10 +57,7 @@ module.exports.create = function(widgetData,container) {
|
|||
}
|
||||
widget.setValue = function(v,send,sync) {
|
||||
if (v==widgetData.on) {
|
||||
widget.addClass('on').removeClass('ripple').addClass('ripple').delay(250).queue(function(next){
|
||||
widget.removeClass('ripple')
|
||||
next()
|
||||
})
|
||||
widget.addClass('on')
|
||||
if (send) widget.sendValue(widgetData.on)
|
||||
} else if (v==widgetData.off) {
|
||||
widget.removeClass('on')
|
||||
|
|
|
|||
|
|
@ -69,10 +69,13 @@ module.exports.create = function(widgetData,container) {
|
|||
|
||||
})
|
||||
|
||||
$('body').on('sync',function(e,id,w){
|
||||
if (widgetData.widgetId!=id || !document.contains(widget[0])) return
|
||||
|
||||
widget.handleSync = function(e,id,w) {
|
||||
if (widgetData.widgetId!=id || !WIDGETS[id]) return
|
||||
widget.startLoop()
|
||||
})
|
||||
}
|
||||
|
||||
$('body').on('sync',widget.handleSync)
|
||||
|
||||
|
||||
widget.cancel = false
|
||||
|
|
|
|||
|
|
@ -1173,24 +1173,6 @@ a {
|
|||
}
|
||||
}
|
||||
|
||||
.ripple:after {
|
||||
content:"";
|
||||
position:absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
right:0;
|
||||
bottom:0;
|
||||
background:$color-accent;
|
||||
animation:ripple 0.25s linear;
|
||||
animation-fill-mode: forwards;
|
||||
opacity:.4
|
||||
}
|
||||
|
||||
@keyframes ripple {
|
||||
100% {opacity:0}
|
||||
}
|
||||
|
||||
|
||||
/* Multiple widgets (push|toggle|fader) matrix */
|
||||
.multitoggle-container, .multipush-container, .multifader-container {
|
||||
height:200rem;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue