Skip to content
Snippets Groups Projects
Commit 9213c32a authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

small change

parent 438dcf80
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,8 @@ define(['jquery', 'underscore', 'menuParent', 'plist', 'materials', 'text!materi
events: {
"click #cancelMaterial": "_cancelMaterial",
"click #deleteMaterial": "_deleteMaterial",
"click #finishMaterial": "_save"
"click #finishMaterial": "_save",
"click #newRandomColor": "_changeRandomColor"
},
_initialize: function(){
......@@ -31,6 +32,13 @@ define(['jquery', 'underscore', 'menuParent', 'plist', 'materials', 'text!materi
$target.css("border-color", hex);
},
_changeRandomColor: function(e){
e.preventDefault();
var color = '#' + Math.floor(Math.random()*16777215).toString(16);
this.material.altColor = color;
this.render();
},
_save: function(e){
e.preventDefault();
var name = this.material.name;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment