Layers with code enabled
This commit is contained in:
1 parent
9186f371be
commit
5264885ab8
4 files changed
+27
-5
No files matched your search
@@ -460,6 +460,10 @@ function newStrategyPartConstructor () {
|
||||
break
|
||||
}
|
||||
case 'Layer': {
|
||||
strategyPart.codeEditor = newCodeEditor()
|
||||
strategyPart.codeEditor.isVisibleFunction = strategyPart.isVisibleFunction
|
||||
strategyPart.codeEditor.initialize()
|
||||
strategyPart.codeEditor.container.connectToParent(strategyPart.container, false, false, true, true, false, false, false, false)
|
||||
addLeftIcons(menuItemsInitialValues, floatingObject)
|
||||
menuItemsInitialValues.push(
|
||||
{
|
||||
@@ -481,7 +485,22 @@ function newStrategyPartConstructor () {
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: -40
|
||||
angle: -60
|
||||
}
|
||||
)
|
||||
menuItemsInitialValues.push(
|
||||
{
|
||||
action: 'Edit Layer',
|
||||
actionFunction: strategyPart.codeEditor.activate,
|
||||
label: 'Edit Layer',
|
||||
visible: true,
|
||||
iconPathOn: 'html',
|
||||
iconPathOff: 'html',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: -20,
|
||||
dontShowAtFullscreen: true
|
||||
}
|
||||
)
|
||||
menuItemsInitialValues.push(
|
||||
@@ -497,7 +516,7 @@ function newStrategyPartConstructor () {
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 0
|
||||
angle: 20
|
||||
}
|
||||
)
|
||||
menuItemsInitialValues.push(
|
||||
@@ -511,7 +530,7 @@ function newStrategyPartConstructor () {
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 40
|
||||
angle: 60
|
||||
}
|
||||
)
|
||||
break
|
||||
|
||||
@@ -529,7 +529,8 @@ function newPartsFromNodes () {
|
||||
|
||||
function addLayer (node) {
|
||||
let layer = {
|
||||
name: 'New Layer'
|
||||
name: 'New Layer',
|
||||
code: '{}'
|
||||
}
|
||||
node.layers.push(layer)
|
||||
createPart('Layer', layer.name, layer, node, node, 'Layer')
|
||||
|
||||
@@ -487,7 +487,8 @@ function newProtocolNode () {
|
||||
let object = {
|
||||
type: node.type,
|
||||
subType: node.subType,
|
||||
name: node.name
|
||||
name: node.name,
|
||||
code: node.code
|
||||
}
|
||||
if (includeIds) {
|
||||
object.id = node.id
|
||||
|
||||
@@ -461,6 +461,7 @@ function newStringifyNode () {
|
||||
type: node.type,
|
||||
subType: node.subType,
|
||||
name: node.name,
|
||||
code: node.code,
|
||||
savedPayload: getSavedPayload(node)
|
||||
}
|
||||
return object
|
||||
|
||||
Reference in new issue
Block a user