uikit 3.13.6-dev.f130508b6 → 3.13.7-dev.120e5ee9c
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/CHANGELOG.md +15 -4
- package/build/util.js +1 -1
- package/dist/css/uikit-core-rtl.css +7 -12
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +7 -12
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +7 -12
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +7 -12
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +1 -1
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +1 -1
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +1 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +2 -2
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +1 -1
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +2 -2
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +1 -1
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +19 -53
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +146 -228
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +146 -228
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/components/slider-parallax.js +1 -1
- package/src/js/core/drop.js +1 -1
- package/src/js/core/height-match.js +3 -0
- package/src/js/core/height-viewport.js +4 -2
- package/src/js/core/img.js +0 -57
- package/src/js/mixin/position.js +16 -49
- package/src/js/util/position.js +129 -125
- package/src/less/components/drop.less +1 -1
- package/src/less/components/dropdown.less +1 -1
- package/src/less/components/nav.less +1 -5
- package/src/less/components/navbar.less +2 -2
- package/src/less/components/tooltip.less +1 -1
- package/src/scss/components/drop.scss +1 -1
- package/src/scss/components/dropdown.scss +1 -1
- package/src/scss/components/nav.scss +1 -5
- package/src/scss/components/navbar.scss +2 -2
- package/src/scss/components/tooltip.scss +1 -1
- package/tests/position.html +39 -38
package/tests/position.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<style>
|
|
10
10
|
|
|
11
11
|
/* JavaScript */
|
|
12
|
-
#js-
|
|
12
|
+
#js-boundary {
|
|
13
13
|
height: 300px;
|
|
14
14
|
outline: 1px solid rgba(0,0,0,0.1);
|
|
15
15
|
position: relative;
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
#js-element {
|
|
28
28
|
position: absolute;
|
|
29
|
+
display: none;
|
|
29
30
|
width: 75px;
|
|
30
31
|
height: 75px;
|
|
31
32
|
background: rgba(0,0,0,0.1);
|
|
@@ -237,13 +238,13 @@
|
|
|
237
238
|
|
|
238
239
|
<h2>JavaScript</h2>
|
|
239
240
|
|
|
240
|
-
<div id="js-
|
|
241
|
+
<div id="js-boundary" class="uk-margin">
|
|
241
242
|
<div id="js-target" class="uk-flex uk-flex-center uk-flex-middle" draggable="true">Drag me!</div>
|
|
242
243
|
</div>
|
|
243
244
|
|
|
244
245
|
<div id="js-element"></div>
|
|
245
246
|
|
|
246
|
-
<div class="uk-grid uk-child-width-auto uk-form-stacked"
|
|
247
|
+
<div class="uk-grid uk-child-width-auto uk-form-stacked">
|
|
247
248
|
<div>
|
|
248
249
|
|
|
249
250
|
<div class="uk-margin">
|
|
@@ -326,26 +327,27 @@
|
|
|
326
327
|
|
|
327
328
|
<script>
|
|
328
329
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
330
|
+
var util = UIkit.util,
|
|
331
|
+
$ = util.$,
|
|
332
|
+
on = util.on,
|
|
333
|
+
offset = util.offset,
|
|
334
|
+
ticking,
|
|
335
|
+
element = $('#js-element'),
|
|
336
|
+
boundary = $('#js-boundary'),
|
|
337
|
+
target = $('#js-target'),
|
|
338
|
+
offsetX,
|
|
339
|
+
offsetY;
|
|
335
340
|
|
|
336
341
|
function position() {
|
|
337
|
-
positionAt(
|
|
342
|
+
util.positionAt(
|
|
338
343
|
element,
|
|
339
344
|
target,
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
offset: [$('#js-offset_x').value, $('#js-offset_y').value],
|
|
347
|
-
flip: [$('#js-flip_x').value, $('#js-flip_y').value]
|
|
348
|
-
}
|
|
345
|
+
$('#js-element_x').value + ' ' + $('#js-element_y').value,
|
|
346
|
+
$('#js-target_x').value + ' ' + $('#js-target_y').value,
|
|
347
|
+
$('#js-offset_x').value + ' ' + $('#js-offset_y').value,
|
|
348
|
+
null,
|
|
349
|
+
$('#js-flip_x').value + $('#js-flip_y').value,
|
|
350
|
+
boundary
|
|
349
351
|
);
|
|
350
352
|
}
|
|
351
353
|
|
|
@@ -357,34 +359,33 @@
|
|
|
357
359
|
|
|
358
360
|
});
|
|
359
361
|
|
|
360
|
-
let lastPos;
|
|
361
362
|
on(window, 'dragover', function (e) {
|
|
362
363
|
|
|
363
|
-
|
|
364
|
+
e.preventDefault();
|
|
364
365
|
|
|
365
|
-
if (
|
|
366
|
-
|
|
367
|
-
}
|
|
368
|
-
lastPos = pos;
|
|
366
|
+
if (!ticking) {
|
|
367
|
+
requestAnimationFrame(function () {
|
|
369
368
|
|
|
370
|
-
|
|
369
|
+
util.positionAt(
|
|
370
|
+
target,
|
|
371
|
+
boundary,
|
|
372
|
+
'left top',
|
|
373
|
+
'left top',
|
|
374
|
+
(e.pageX - offset(boundary).left - offsetX) + ' ' + (e.pageY - offset(boundary).top - offsetY)
|
|
375
|
+
);
|
|
371
376
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
}
|
|
379
|
-
);
|
|
377
|
+
position();
|
|
378
|
+
|
|
379
|
+
ticking = false;
|
|
380
|
+
});
|
|
381
|
+
ticking = true;
|
|
382
|
+
}
|
|
380
383
|
|
|
381
|
-
// positions element at target
|
|
382
|
-
position();
|
|
383
384
|
});
|
|
384
385
|
|
|
385
|
-
|
|
386
|
-
on(window, 'scroll', position);
|
|
386
|
+
util.$$('select,input').forEach(el => on(el, 'change', position));
|
|
387
387
|
|
|
388
|
+
util.css(element, 'display', 'block');
|
|
388
389
|
position();
|
|
389
390
|
|
|
390
391
|
</script>
|