Sfoglia il codice sorgente

CTRLPainter now has VERY rough scaling using mouse wheel

dev-tmpl
Bryan Miller 5 anni fa
parent
commit
f5b3d77a03
1 ha cambiato i file con 11 aggiunte e 0 eliminazioni
  1. +11
    -0
      app/js/ctrls/CTRLPainter.js

+ 11
- 0
app/js/ctrls/CTRLPainter.js Vedi File

@@ -104,6 +104,17 @@ class CTRLPainter {
this.render();
}).bind(this);
input.listen("shift+mouseleft+mousemove", handle_offset);

var handle_scale = (function(e){
if (e.delta < 0){
this.scale_down();
} else if (e.delta > 0){
this.scale_up();
}
if (e.delta !== 0)
this.render();
}).bind(this);
input.listen("wheel", handle_scale);
}



Loading…
Annulla
Salva