forked from gee/bd-chapril
HTML only and JQuery deprecated methods replaced
This commit is contained in:
parent
6727e91eed
commit
ff7a0263c2
@ -31,7 +31,7 @@ cg.clearScreen = function(){
|
||||
scene.update();
|
||||
}
|
||||
|
||||
$(d).keyup(function(e){
|
||||
$(d).on('keyup', function(e){
|
||||
|
||||
var key = e.keyCode || e.which;
|
||||
|
||||
@ -47,7 +47,7 @@ $(d).keyup(function(e){
|
||||
}
|
||||
});
|
||||
|
||||
$(d).keydown(function(event){
|
||||
$(d).on('keydown', function(event){
|
||||
|
||||
var key = event.keyCode || event.which;
|
||||
|
||||
@ -273,3 +273,25 @@ cg.setScreen = function(w, h){
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$('#newText').on('keyup', cg.createTextFromInput);
|
||||
|
||||
$('#imageFileInput').on('change', function() {
|
||||
cg.createImageFromInput(this);
|
||||
});
|
||||
|
||||
$('#uploadSave').on('click', function() {
|
||||
$('#imageFileInput').click();
|
||||
});
|
||||
|
||||
$('#textTool').on('click', function() {
|
||||
cg.createText();
|
||||
});
|
||||
|
||||
$('#toolbarImageSave').on('click', function() {
|
||||
cg.saveImage();
|
||||
});
|
||||
|
||||
$('#resizeCanvas').on('click', function() {
|
||||
cg.setScreen($('#newWidth').val(), $('#newHeight').val());
|
||||
});
|
Loading…
Reference in New Issue
Block a user