fix-ob-bug
This commit is contained in:
@@ -78,10 +78,11 @@ $(function(){
|
|||||||
'ble': add_ble,
|
'ble': add_ble,
|
||||||
'pixel': add_pixel,
|
'pixel': add_pixel,
|
||||||
'input_mic': add_mic,
|
'input_mic': add_mic,
|
||||||
'tinydb': add_tinydb
|
'tinydb': add_tinydb,
|
||||||
|
'timer': add_timer
|
||||||
}
|
}
|
||||||
console.log(un.attr('user-type'))
|
console.log(un.attr('user-type'))
|
||||||
toolkits[un.attr('user-type')](un.attr('user-title'),un.attr('user-topic'),un.attr('user-content'),un.attr('style'));
|
toolkits[un.attr('user-type')](un.attr('user-title'),un.attr('user-topic'),un.attr('user-content'),un.attr('style'),un.attr('title_style'),true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var modald = showmodaltext("<div style='text-align:center' class='nnt'><i class='fa fa-spin fa-cog' style='font-size:2rem;color:#4e73df'></i><p style='margin-top:6px;margin-bottom:0;color:#4e73df;font-size:1rem;font-weight:bold'>"+JSLang[lang].loading+"</p></div>")
|
var modald = showmodaltext("<div style='text-align:center' class='nnt'><i class='fa fa-spin fa-cog' style='font-size:2rem;color:#4e73df'></i><p style='margin-top:6px;margin-bottom:0;color:#4e73df;font-size:1rem;font-weight:bold'>"+JSLang[lang].loading+"</p></div>")
|
||||||
@@ -92,7 +93,7 @@ $(function(){
|
|||||||
{
|
{
|
||||||
view_project(JSON.parse(JSON.parse(res).projectLayout),JSON.parse(res).userName,JSON.parse(res).projectPass,JSON.parse(res).projectName,JSON.parse(res).timeStamp)
|
view_project(JSON.parse(JSON.parse(res).projectLayout),JSON.parse(res).userName,JSON.parse(res).projectPass,JSON.parse(res).projectName,JSON.parse(res).timeStamp)
|
||||||
if(JSON.parse(res).logicStorage)
|
if(JSON.parse(res).logicStorage)
|
||||||
globalCode = stringendecoder.decodeHtml(JSON.parse(JSON.parse(res).logicStorage).code)
|
globalCode = MixIO.preCode + stringendecoder.decodeHtml(JSON.parse(JSON.parse(res).logicStorage).code)
|
||||||
else
|
else
|
||||||
globalCode = ''
|
globalCode = ''
|
||||||
$("#grid").removeClass("gridbg")
|
$("#grid").removeClass("gridbg")
|
||||||
|
|||||||
@@ -2350,7 +2350,7 @@ function add_magic(user_title, user_topic, user_content, user_style, title_style
|
|||||||
itemdiv.attr('style', user_style)
|
itemdiv.attr('style', user_style)
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_timer(user_title, user_topic, user_content, user_style, title_style) {
|
function add_timer(user_title, user_topic, user_content, user_style, title_style, isObserve) {
|
||||||
var isAlive = true
|
var isAlive = true
|
||||||
var contents = []
|
var contents = []
|
||||||
var title = $("<h4 class='userTitle'>" + user_title + "</h4>")
|
var title = $("<h4 class='userTitle'>" + user_title + "</h4>")
|
||||||
@@ -2388,8 +2388,8 @@ function add_timer(user_title, user_topic, user_content, user_style, title_style
|
|||||||
}, triggerInterval)
|
}, triggerInterval)
|
||||||
}
|
}
|
||||||
MixIO.triggersToPreCode()
|
MixIO.triggersToPreCode()
|
||||||
MixIO.editor.setValue(MixIO.preCode + Blockly.JavaScript.workspaceToCode(workspace))
|
if(!isObserve)
|
||||||
|
MixIO.editor.setValue(MixIO.preCode + Blockly.JavaScript.workspaceToCode(workspace))
|
||||||
var delete_on_click = function() {
|
var delete_on_click = function() {
|
||||||
title.parent().parent().remove();
|
title.parent().parent().remove();
|
||||||
isAlive = false
|
isAlive = false
|
||||||
|
|||||||
Reference in New Issue
Block a user