Skip to content

Commit

Permalink
Add few missing semicolons
Browse files Browse the repository at this point in the history
  • Loading branch information
fukanchik committed Jan 11, 2024
1 parent 0e6a8ae commit 020813f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions memory.html
Original file line number Diff line number Diff line change
Expand Up @@ -455,35 +455,35 @@ <h2>Tutorial</h2>
MemoryView.prototype.setWidth = function(w) {
this.canvas.width = w;
this.redraw();
}
};
MemoryView.prototype.dragDo = function(ev) {
if(!this.dragging) return;
var w = this.canvas.width;
var onscreenCells = Math.floor(w / this.cellWidth);
var newOffset = this.offset + (ev.clientX - this.mouseX)
var newOffset = this.offset + (ev.clientX - this.mouseX);
if(Math.abs(newOffset) >= (this.cellWidth * (this.machine.memsize- onscreenCells))) {
return;
}
if(newOffset > 0) newOffset=0;
this.offset = newOffset;
this.mouseX=ev.clientX
this.mouseX = ev.clientX;
this.redraw();
}
};

MemoryView.prototype.dragStart = function(ev) {
this.dragging=true;
this.mouseX=ev.clientX
}
this.mouseX=ev.clientX;
};
MemoryView.prototype.dragStop = function(ev) {
this.dragging=false;
this.mouseX=-1;
}
};

MemoryView.prototype.resize = function()
{
var outer=document.getElementById("memory-wrapper").getBoundingClientRect();
memoryView.setWidth(outer.width);
}
};

MemoryView.prototype.redraw = function()
{
Expand Down

0 comments on commit 020813f

Please sign in to comment.