Skip to content

Commit

Permalink
fix title of behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
ecarriou committed Apr 3, 2020
1 parent 2a1c8cf commit 43132e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/systems/core/editor-behavior.json
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@
"_id": "t103d416bd313444",
"component": "Designer",
"state": "save",
"action": "function save() { \n var val = this.require('editor').getValue(),\n designer = this.require('designer'),\n store = this.require('store').data();\n\n if (this.require('state').menu() === 'action') {\n store.action = val;\n } else {\n store = JSON.parse(val);\n }\n this.require('store').data(store);\n\n // check if ID change\n if (this.require('store').uuid() !== this.require('store').data()._id) {\n this.require('channel').$editorDeleteBehavior(this.require('store').uuid());\n this.require('store').uuid(this.require('store').data()._id);\n }\n\n if (store.state === 'start' && this.require('factory').system().id() === store.component) {\n document.title = 'behavior ' + this.require('factory').system().name() + ' · ' + document.title.split('·')[1].trim();\n } else {\n document.title = 'behavior ' + this.require('store').data().component + '.' + this.require('store').data().state + ' · ' + document.title.split('·')[1].trim();\n }\n\n this.require('channel').$editorUpdateBehavior(this.require('store').uuid(), this.require('store').data());\n this.require('message').clean();\n this.require('message').success('Behavior saved.');\n}",
"action": "function save() { \n var val = this.require('editor').getValue(),\n designer = this.require('designer'),\n store = this.require('store').data();\n\n if (this.require('state').menu() === 'action') {\n store.action = val;\n } else {\n store = JSON.parse(val);\n }\n this.require('store').data(store);\n\n // check if ID change\n if (this.require('store').uuid() !== this.require('store').data()._id) {\n this.require('channel').$editorDeleteBehavior(this.require('store').uuid());\n this.require('store').uuid(this.require('store').data()._id);\n }\n\n if (store.state === 'start' && this.require('factory').system().id() === store.component) {\n document.title = 'behavior ' + this.require('factory').system().name()+ '.start ' + ' · ' + document.title.split('·')[1].trim();\n } else {\n document.title = 'behavior ' + this.require('store').data().component + '.' + this.require('store').data().state + ' · ' + document.title.split('·')[1].trim();\n }\n\n this.require('channel').$editorUpdateBehavior(this.require('store').uuid(), this.require('store').data());\n this.require('message').clean();\n this.require('message').success('Behavior saved.');\n}",
"useCoreAPI": false,
"core": false
},
Expand Down

0 comments on commit 43132e3

Please sign in to comment.