forked from gee/bd-chapril
Zoomable canvas picture without movement in the page
This commit is contained in:
parent
cfb38ea271
commit
392dd2a4aa
@ -61,7 +61,7 @@
|
||||
<!-- fin tableau de bord -->
|
||||
|
||||
<div id="cscreen">
|
||||
<canvas class="rc" id="c" crossorigin="anonymous" width="800" height="600">
|
||||
<canvas class="rc" id="c" crossorigin="anonymous" width="800" height="600" tabindex=0>
|
||||
Le générateur du GKND a besoin d'un navigateur récent et de javascript pour fonctionner.
|
||||
</canvas>
|
||||
</div>
|
||||
|
@ -33,7 +33,7 @@ cg.clearScreen = function(){
|
||||
|
||||
$(d).on('keyup', function(e){
|
||||
|
||||
var key = e.keyCode || e.which;
|
||||
var key = e.which;
|
||||
|
||||
if(key == 46 && currentObj){
|
||||
scene.remove(currentObj);
|
||||
@ -47,9 +47,9 @@ $(d).on('keyup', function(e){
|
||||
}
|
||||
});
|
||||
|
||||
$(d).on('keydown', function(event){
|
||||
|
||||
var key = event.keyCode || event.which;
|
||||
canvas.on('focusin').on('keydown', function(event){
|
||||
event.preventDefault();
|
||||
var key = event.which;
|
||||
|
||||
if(key == 38 && currentObj){
|
||||
cg.zoomIn(currentObj);
|
||||
|
Loading…
Reference in New Issue
Block a user