This commit is contained in:
George Berezhnoy 2017-11-30 18:55:39 +03:00
commit ee7dac2dcb
5 changed files with 23 additions and 21 deletions

View file

@ -4191,7 +4191,7 @@ var CodexEditor =
this.config = config;
this.Editor = null;
this._blocks = null;
this._currentBlcokIndex = -1;
this._currentBloсkIndex = -1;
}
/**
@ -4255,7 +4255,7 @@ var CodexEditor =
var toolInstance = this.Editor.Tools.construct(toolName, data),
block = new _block2.default(toolInstance);
this._blocks[++this._currentBlcokIndex] = block;
this._blocks[++this._currentBloсkIndex] = block;
}
/**
@ -4296,7 +4296,7 @@ var CodexEditor =
key: 'currentBlock',
get: function get() {
return this._blocks[this._currentBlcokIndex];
return this._blocks[this._currentBloсkIndex];
}
/**
@ -4309,7 +4309,7 @@ var CodexEditor =
key: 'currentNode',
get: function get() {
return this._blocks.nodes[this._currentBlcokIndex];
return this._blocks.nodes[this._currentBloсkIndex];
}
/**
@ -4324,7 +4324,7 @@ var CodexEditor =
var nodes = this._blocks.nodes;
this._currentBlcokIndex = nodes.indexOf(element);
this._currentBloсkIndex = nodes.indexOf(element);
}
/**
@ -4402,6 +4402,7 @@ var CodexEditor =
if (index > this.length) {
// @todo decide how to handle this case
return;
}
@ -4600,7 +4601,7 @@ var CodexEditor =
content: 'ce-block__content'
};
this._html = this._compose();
this._html = this.compose();
}
/**
@ -4612,8 +4613,8 @@ var CodexEditor =
_createClass(Block, [{
key: '_compose',
value: function _compose() {
key: 'compose',
value: function compose() {
var wrapper = _dom2.default.make('div', this.CSS.wrapper),
content = _dom2.default.make('div', this.CSS.content);
@ -4817,7 +4818,7 @@ var CodexEditor =
chainData.push({
function: function _function() {
return _this._makeBlock(items[i]);
return _this.makeBlock(items[i]);
}
});
};
@ -4840,8 +4841,8 @@ var CodexEditor =
*/
}, {
key: '_makeBlock',
value: function _makeBlock(item) {
key: 'makeBlock',
value: function makeBlock(item) {
var tool = item.type,
data = item.data;

File diff suppressed because one or more lines are too long

View file

@ -27,7 +27,7 @@ export default class Block {
content: 'ce-block__content'
};
this._html = this._compose();
this._html = this.compose();
}
@ -37,7 +37,7 @@ export default class Block {
* @returns {HTMLDivElement}
* @private
*/
_compose() {
compose() {
let wrapper = $.make('div', this.CSS.wrapper),
content = $.make('div', this.CSS.content);

View file

@ -20,7 +20,7 @@ module.exports = class BlockManager {
this.config = config;
this.Editor = null;
this._blocks = null;
this._currentBlcokIndex = -1;
this._currentBloсkIndex = -1;
}
@ -83,7 +83,7 @@ module.exports = class BlockManager {
let toolInstance = this.Editor.Tools.construct(toolName, data),
block = new Block(toolInstance);
this._blocks[++this._currentBlcokIndex] = block;
this._blocks[++this._currentBloсkIndex] = block;
}
@ -115,7 +115,7 @@ module.exports = class BlockManager {
*/
get currentBlock() {
return this._blocks[this._currentBlcokIndex];
return this._blocks[this._currentBloсkIndex];
}
@ -126,7 +126,7 @@ module.exports = class BlockManager {
*/
get currentNode() {
return this._blocks.nodes[this._currentBlcokIndex];
return this._blocks.nodes[this._currentBloсkIndex];
}
@ -141,7 +141,7 @@ module.exports = class BlockManager {
let nodes = this._blocks.nodes;
this._currentBlcokIndex = nodes.indexOf(element);
this._currentBloсkIndex = nodes.indexOf(element);
}
@ -210,6 +210,7 @@ class Blocks {
if (index > this.length) {
// @todo decide how to handle this case
return;
}

View file

@ -45,7 +45,7 @@ module.exports = class Renderer {
for (let i = 0; i < items.length; i++) {
chainData.push({
function: () => this._makeBlock(items[i])
function: () => this.makeBlock(items[i])
});
}
@ -63,7 +63,7 @@ module.exports = class Renderer {
* @returns {Promise.<T>}
* @private
*/
_makeBlock(item) {
makeBlock(item) {
let tool = item.type,
data = item.data;