-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare plugins #148
Prepare plugins #148
Conversation
# Conflicts: # codex-editor.js # codex-editor.js.map # whatwg-fetch.js.map
codex.js
Outdated
inputs : [] | ||
jsonOutput : [], | ||
blocks : [], | ||
ArrayOfCachedData : [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
почему первое слово с большой буквы?
modules/draw.js
Outdated
@@ -311,6 +311,16 @@ module.exports = (function (draw) { | |||
|
|||
}; | |||
|
|||
draw.unavailableBlock = function ( data ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
в комментах нужно описать что за data. А лучше вынести ее из этой функции, тк dataset относится к логике, а тут только рисование
modules/renderer.js
Outdated
var block = editor.tools[pluginName].render(blockData.data); | ||
if ( editor.tools[pluginName].available === false ) { | ||
|
||
block = editor.draw.unavailableBlock(ArrayOfCachedData.length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ArrayOfCachedData.length — это что означает?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
уверен, что надежно так обращаться?
modules/renderer.js
Outdated
var block = editor.tools[pluginName].render(blockData.data); | ||
if ( editor.tools[pluginName].available === false ) { | ||
|
||
block = editor.draw.unavailableBlock(ArrayOfCachedData.length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
уверен, что надежно так обращаться?
Plugins preparation should be executed asynchronically