@sedoo/unidoo 0.0.51 → 0.0.52
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/dist/unidoo.common.js +68 -63
- package/dist/unidoo.common.js.map +1 -1
- package/dist/unidoo.umd.js +68 -63
- package/dist/unidoo.umd.js.map +1 -1
- package/dist/unidoo.umd.min.js +1 -1
- package/dist/unidoo.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/unidoo-player/unidoo-player-layout/UnidooPlayerLayout.vue +7 -5
package/package.json
CHANGED
|
@@ -338,16 +338,18 @@ export default {
|
|
|
338
338
|
initGraduation(){
|
|
339
339
|
let result = [];
|
|
340
340
|
if(this.graduation){
|
|
341
|
-
const size = this.sliderSize;
|
|
342
|
-
|
|
343
341
|
const gradsLength = this.graduation.length;
|
|
344
342
|
let delta = 1;
|
|
345
|
-
if(
|
|
343
|
+
if(this.sliderSize && gradsLength && this.graduation[0]){
|
|
346
344
|
const firstGrad = this.graduation[0].length * 9; // nb chars * number of pixels for 1 character
|
|
347
|
-
let exceed = Math.ceil(this.sliderSize - (gradsLength * firstGrad) - 30);
|
|
345
|
+
let exceed = Math.ceil(this.sliderSize - (gradsLength * firstGrad) - 30); // add 30px of margin
|
|
348
346
|
exceed = (exceed < 0) ? - exceed : 0;
|
|
349
347
|
const gradsExceed = exceed / firstGrad;
|
|
350
|
-
|
|
348
|
+
if(gradsLength - gradsExceed){
|
|
349
|
+
delta = Math.ceil(gradsLength / (gradsLength - gradsExceed));
|
|
350
|
+
} else {
|
|
351
|
+
delta = Math.ceil(gradsLength);
|
|
352
|
+
}
|
|
351
353
|
}
|
|
352
354
|
|
|
353
355
|
let n = 0;
|