added support for namespaces on types
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -131,7 +131,7 @@ module.exports = {
|
||||
for (_i = 0, _len = hb.length; _i < _len; _i++) {
|
||||
o = hb[_i];
|
||||
_hb.push(o);
|
||||
if (_hb.length > 30) {
|
||||
if (_hb.length > 10) {
|
||||
this.broadcast({
|
||||
sync_step: "applyHB_",
|
||||
data: _hb
|
||||
@@ -159,7 +159,7 @@ module.exports = {
|
||||
for (_i = 0, _len = hb.length; _i < _len; _i++) {
|
||||
o = hb[_i];
|
||||
_hb.push(o);
|
||||
if (_hb.length > 30) {
|
||||
if (_hb.length > 10) {
|
||||
this.broadcast({
|
||||
sync_step: "applyHB_",
|
||||
data: _hb
|
||||
@@ -221,7 +221,7 @@ module.exports = {
|
||||
for (_j = 0, _len1 = hb.length; _j < _len1; _j++) {
|
||||
o = hb[_j];
|
||||
_hb.push(o);
|
||||
if (_hb.length > 30) {
|
||||
if (_hb.length > 10) {
|
||||
sendApplyHB({
|
||||
sync_step: "applyHB_",
|
||||
data: _hb
|
||||
|
||||
@@ -190,11 +190,18 @@ module.exports = function() {
|
||||
};
|
||||
|
||||
Operation.prototype.getCustomType = function() {
|
||||
var Type, t, _i, _len, _ref;
|
||||
if (this.custom_type == null) {
|
||||
throw new Error("This operation was not initialized with a custom type");
|
||||
}
|
||||
if (this.custom_type.constructor === String) {
|
||||
this.custom_type = new this.custom_types[this.custom_type]();
|
||||
Type = this.custom_types;
|
||||
_ref = this.custom_type.split(".");
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
t = _ref[_i];
|
||||
Type = Type[t];
|
||||
}
|
||||
this.custom_type = new Type();
|
||||
this.custom_type._setModel(this);
|
||||
}
|
||||
return this.custom_type;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user