Skip to content

Commit

Permalink
Merge pull request #455 from entrylabs/issue/remove-function
Browse files Browse the repository at this point in the history
conflict
  • Loading branch information
chanlee authored Aug 19, 2016
2 parents 8106b0b + fd1ad98 commit 24e8d2f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 29 deletions.
7 changes: 0 additions & 7 deletions dist/entry.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
var Entry = {block:{}, TEXT_ALIGN_CENTER:0, TEXT_ALIGN_LEFT:1, TEXT_ALIGN_RIGHT:2, TEXT_ALIGNS:["center", "left", "right"], clipboard:null, loadProject:function(b) {
b || (b = Entry.getStartProject(Entry.mediaFilePath));
this.setFuncRefs(b.functions);
"workspace" == this.type && Entry.stateManager.startIgnore();
Entry.projectId = b._id;
Entry.variableContainer.setVariables(b.variables);
Expand Down Expand Up @@ -124,12 +123,6 @@ var Entry = {block:{}, TEXT_ALIGN_CENTER:0, TEXT_ALIGN_LEFT:1, TEXT_ALIGN_RIGHT:
a.template = Lang.template.function_general;
Entry.block[b] = a;
}
}, setFuncRefs:function(b) {
this.functions = b ? b.map(function(a) {
return a.id;
}) : [];
}, removeFuncRefs:function() {
delete this.functions;
}};
window.Entry = Entry;
Entry.Albert = {PORT_MAP:{leftWheel:0, rightWheel:0, buzzer:0, leftEye:0, rightEye:0, note:0, bodyLed:0, frontLed:0, padWidth:0, padHeight:0}, setZero:function() {
Expand Down
12 changes: 6 additions & 6 deletions dist/entry.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 0 additions & 16 deletions src/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ Entry.loadProject = function(project) {
project = Entry.getStartProject(Entry.mediaFilePath);
}

this.setFuncRefs(project.functions);

if (this.type == 'workspace')
Entry.stateManager.startIgnore();
Entry.projectId = project._id;
Expand Down Expand Up @@ -355,18 +353,4 @@ Entry.generateFunctionSchema = function(functionId) {
Entry.block[functionId] = blockSchema;
};

Entry.setFuncRefs = function(functions) {
if (!functions) this.functions = [];
else {
this.functions = functions.map(function(f) {
return f.id;
});
}
};

Entry.removeFuncRefs = function() {
delete this.functions;
};


window.Entry = Entry;

0 comments on commit 24e8d2f

Please sign in to comment.