1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-22 14:33:51 +00:00

verilog: waveform scroll left/right with wheel event

This commit is contained in:
Steven Hugg 2021-07-03 09:06:13 -05:00
parent c0d60edbad
commit f4d8435c59

View File

@ -137,6 +137,13 @@ export class WaveformView {
down = false; down = false;
//if (e['pointerId']) e.target.releasePointerCapture(e['pointerId']); //if (e['pointerId']) e.target.releasePointerCapture(e['pointerId']);
}); });
// scroll left/right
$(wlc).on('wheel', (event:any) => {
if (Math.abs(event.originalEvent.deltaX) > Math.abs(event.originalEvent.deltaY)) {
var xdelta = Math.max(-1000, Math.min(1000, event.originalEvent.deltaX));
if (xdelta) this.setOrgTime(this.t0 + xdelta);
}
});
this.toolbar.add('=', 'Zoom In', 'glyphicon-zoom-in', (e,combo) => { this.toolbar.add('=', 'Zoom In', 'glyphicon-zoom-in', (e,combo) => {
this.setZoom(this.zoom * 2); this.setZoom(this.zoom * 2);
}); });