Commit 11007b4f authored by George Popoff's avatar George Popoff

make typos window movable only when drag title

parent bf7e8235
...@@ -31,8 +31,11 @@ ETYPOS.prototype = { ...@@ -31,8 +31,11 @@ ETYPOS.prototype = {
needConstructPanel: true, needConstructPanel: true,
// Окно добавления опечаток
element: null, element: null,
// Заголовок окна
elementTitle: null,
// Idar // Idar
pageId: 0, pageId: 0,
...@@ -145,7 +148,8 @@ ETYPOS.prototype = { ...@@ -145,7 +148,8 @@ ETYPOS.prototype = {
document.body.appendChild(div); document.body.appendChild(div);
this.element = document.querySelector(".e_typos_div"); this.element = document.querySelector(".e_typos_div");
this.elementTitle = this.element.querySelector(".e_typos_title");
this.needConstructPanel = false; this.needConstructPanel = false;
}, },
...@@ -202,7 +206,7 @@ ETYPOS.prototype = { ...@@ -202,7 +206,7 @@ ETYPOS.prototype = {
} }
}; };
this.element.addEventListener("mousedown", function (e) { this.elementTitle.addEventListener("mousedown", function (e) {
self.clearSelectedText(); self.clearSelectedText();
self.lastMousePos.x = e.clientX; self.lastMousePos.x = e.clientX;
self.lastMousePos.y = e.clientY; self.lastMousePos.y = e.clientY;
...@@ -213,7 +217,7 @@ ETYPOS.prototype = { ...@@ -213,7 +217,7 @@ ETYPOS.prototype = {
return false; return false;
}); });
this.element.addEventListener("mouseup", function () { this.elementTitle.addEventListener("mouseup", function () {
self.isDragged = false; self.isDragged = false;
}); });
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
-moz-user-select: none; -moz-user-select: none;
-webkit-user-select: none; -webkit-user-select: none;
border: 1px solid #4169e1; border: 1px solid #4169e1;
cursor: pointer;
} }
.e_typos_div .e_typos_title { .e_typos_div .e_typos_title {
...@@ -22,6 +21,7 @@ ...@@ -22,6 +21,7 @@
background: #4169e1; background: #4169e1;
color: white; color: white;
margin-top: 2px; margin-top: 2px;
cursor: pointer;
} }
.e_typos_div .e_typos_title .e_typos_close { .e_typos_div .e_typos_title .e_typos_close {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment