1
0
forked from gee/bd-chapril

HTML only and JQuery deprecated methods replaced

This commit is contained in:
Frédéric Henry 2025-01-02 23:26:48 +01:00
parent 6727e91eed
commit ff7a0263c2
Signed by: fhenry2
GPG Key ID: D752390BFF432D86

View File

@ -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());
});