locize 4.0.14 → 4.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/ui/popup.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { startMouseTracking, stopMouseTracking } from './mouseDistance.js'
2
2
 
3
- export function initDragElement () {
3
+ export function initDragElement() {
4
4
  let pos1 = 0
5
5
  let pos2 = 0
6
6
  let pos3 = 0
@@ -8,7 +8,7 @@ export function initDragElement () {
8
8
  const popups = document.getElementsByClassName('i18next-editor-popup')
9
9
  let elmnt = null
10
10
  let overlay = null
11
- let currentZIndex = 100 // TODO reset z index when a threshold is passed
11
+ let currentZIndex = 100000 // TODO reset z index when a threshold is passed
12
12
 
13
13
  for (let i = 0; i < popups.length; i++) {
14
14
  const popup = popups[i]
@@ -24,7 +24,7 @@ export function initDragElement () {
24
24
  }
25
25
  }
26
26
 
27
- function dragMouseDown (e) {
27
+ function dragMouseDown(e) {
28
28
  if (!overlay) { overlay = document.getElementById('i18next-editor-popup-overlay') }
29
29
  if (overlay) overlay.style.display = 'block'
30
30
  stopMouseTracking()
@@ -41,7 +41,7 @@ export function initDragElement () {
41
41
  document.onmousemove = elementDrag
42
42
  }
43
43
 
44
- function elementDrag (e) {
44
+ function elementDrag(e) {
45
45
  if (!elmnt) {
46
46
  return
47
47
  }
@@ -57,7 +57,7 @@ export function initDragElement () {
57
57
  elmnt.style.left = elmnt.offsetLeft - pos1 + 'px'
58
58
  }
59
59
 
60
- function closeDragElement () {
60
+ function closeDragElement() {
61
61
  startMouseTracking()
62
62
  if (overlay) overlay.style.display = 'none'
63
63
 
@@ -75,7 +75,7 @@ export function initDragElement () {
75
75
  document.onmousemove = null
76
76
  }
77
77
 
78
- function getHeader (element) {
78
+ function getHeader(element) {
79
79
  const headerItems = element.getElementsByClassName(
80
80
  'i18next-editor-popup-header'
81
81
  )
@@ -88,7 +88,7 @@ export function initDragElement () {
88
88
  }
89
89
  }
90
90
 
91
- export function initResizeElement () {
91
+ export function initResizeElement() {
92
92
  const popups = document.getElementsByClassName('i18next-editor-popup')
93
93
  let element = null
94
94
  let overlay = null
@@ -116,7 +116,7 @@ export function initResizeElement () {
116
116
  both.parentPopup = p
117
117
  }
118
118
 
119
- function initDrag (e) {
119
+ function initDrag(e) {
120
120
  stopMouseTracking()
121
121
  if (!overlay) { overlay = document.getElementById('i18next-editor-popup-overlay') }
122
122
  if (overlay) overlay.style.display = 'block'
@@ -137,12 +137,12 @@ export function initResizeElement () {
137
137
  document.documentElement.addEventListener('mouseup', stopDrag, false)
138
138
  }
139
139
 
140
- function doDrag (e) {
140
+ function doDrag(e) {
141
141
  element.style.width = startWidth + e.clientX - startX + 'px'
142
142
  element.style.height = startHeight + e.clientY - startY + 'px'
143
143
  }
144
144
 
145
- function stopDrag () {
145
+ function stopDrag() {
146
146
  startMouseTracking()
147
147
  if (overlay) overlay.style.display = 'none'
148
148