[notes] Round note dimensions to int
This commit is contained in:
parent
8f86ddaa75
commit
8d489b4f90
1 changed files with 4 additions and 4 deletions
|
@ -124,10 +124,10 @@ function renderEditor(noteDiv, note) {
|
|||
function _commit() {
|
||||
noteDiv.classList.remove("dragging");
|
||||
dragStart = null;
|
||||
note.x1 = noteDiv.offsetLeft / scale;
|
||||
note.y1 = noteDiv.offsetTop / scale;
|
||||
note.width = noteDiv.offsetWidth / scale;
|
||||
note.height = noteDiv.offsetHeight / scale;
|
||||
note.x1 = Math.round(noteDiv.offsetLeft / scale);
|
||||
note.y1 = Math.round(noteDiv.offsetTop / scale);
|
||||
note.width = Math.round(noteDiv.offsetWidth / scale);
|
||||
note.height = Math.round(noteDiv.offsetHeight / scale);
|
||||
renderNotes();
|
||||
}
|
||||
noteDiv.addEventListener('mouseup', _commit);
|
||||
|
|
Reference in a new issue