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 = {
needConstructPanel: true,
// Окно добавления опечаток
element: null,
// Заголовок окна
elementTitle: null,
// Idar
pageId: 0,
......@@ -145,7 +148,8 @@ ETYPOS.prototype = {
document.body.appendChild(div);
this.element = document.querySelector(".e_typos_div");
this.elementTitle = this.element.querySelector(".e_typos_title");
this.needConstructPanel = false;
},
......@@ -202,7 +206,7 @@ ETYPOS.prototype = {
}
};
this.element.addEventListener("mousedown", function (e) {
this.elementTitle.addEventListener("mousedown", function (e) {
self.clearSelectedText();
self.lastMousePos.x = e.clientX;
self.lastMousePos.y = e.clientY;
......@@ -213,7 +217,7 @@ ETYPOS.prototype = {
return false;
});
this.element.addEventListener("mouseup", function () {
this.elementTitle.addEventListener("mouseup", function () {
self.isDragged = false;
});
......
......@@ -12,7 +12,6 @@
-moz-user-select: none;
-webkit-user-select: none;
border: 1px solid #4169e1;
cursor: pointer;
}
.e_typos_div .e_typos_title {
......@@ -22,6 +21,7 @@
background: #4169e1;
color: white;
margin-top: 2px;
cursor: pointer;
}
.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