Skip to content

Commit f15110c

Browse files
removed editor animation load button
1 parent 3efd4b8 commit f15110c

File tree

4 files changed

+1
-27
lines changed

4 files changed

+1
-27
lines changed

public/editorController.js

-18
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,6 @@ define(['ui', 'net', 'evileval'], function(ui, net, evileval){
4141
var makeAnimationController = function(exquis){
4242

4343
var controller = {
44-
load: function(){
45-
var pickAnimation = function(chosenAnimationName){
46-
var canvasAnim = exquis.targetCell.canvasAnim;
47-
canvasAnim.uri = net.makeAnimationFileUri(chosenAnimationName);
48-
updateWithCanvasAnim(canvasAnim, chosenAnimationName);
49-
};
50-
51-
// load the list of animation files available on the server
52-
net.HTTPgetJSON("/animations/").then(function(files){
53-
files = files.filter(function(f){
54-
return f.match(/\.js$/);
55-
}).map(function(f){
56-
return f.replace(/\.js$/, "");
57-
});
58-
ui.populateNamePicker("choose animation", files).then(pickAnimation);
59-
});
60-
},
61-
6244
save: function(){
6345
net.saveAnimation(exquis.targetCell.canvasAnim);
6446
},

public/editorView.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@ define([], function(){
2727

2828
var makeAnimationButtons = function(displayAnimationName) {
2929

30-
var animLoadButton = document.getElementById("animation_load_button"),
31-
animSaveButton = document.getElementById("animation_save_button"),
30+
var animSaveButton = document.getElementById("animation_save_button"),
3231
animSaveAsButton = document.getElementById("animation_save_as_button");
3332

3433

35-
animLoadButton.addEventListener('click', animController.load, true);
3634
animSaveButton.addEventListener('click', animController.save, true);
3735

3836
var animSaveAs = function(){

public/index.html

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ <h2 id="assemblage_name"></h2>
3131
<div id="animation_editor">
3232
<h3 id="filename_display"></h3>
3333
<div id="editor-buttons">
34-
<button id="animation_load_button" class="btn" type="button">load</button>
3534
<button id="animation_save_button" class="btn" type="button">save</button>
3635
<button id="animation_save_as_button" class="btn" type="button">save as</button>
3736
</div>

public/net.js

-5
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ define(["iter2d", "evileval"], function(iter2d, evileval){
3131
ajax.send(params);
3232
};
3333

34-
var makeAnimationFileUri = function(animationName){
35-
return "/animations/"+animationName + ".js";
36-
};
37-
3834
var extractAnimationNameFromUri = function(uri){
3935
var match = uri.match(/([^\/]+)\.js/);
4036
return match ? match[1] : uri;
@@ -106,7 +102,6 @@ define(["iter2d", "evileval"], function(iter2d, evileval){
106102
return {saveAnimation: saveAnimation,
107103
getAssemblageNameFromUrlOrDefaultWithUrlChange: getAssemblageNameFromUrlOrDefaultWithUrlChange,
108104
loadAssemblage: loadAssemblage,
109-
makeAnimationFileUri: makeAnimationFileUri,
110105
makeAnimationPath: makeAnimationPath ,
111106
extractAnimationNameFromUri: extractAnimationNameFromUri,
112107
saveAssemblage: saveAssemblage,

0 commit comments

Comments
 (0)