Skip to content

Commit b2ccf39

Browse files
author
hikki
committed
1.9
1 parent 39501e6 commit b2ccf39

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

resources/assets/component.css

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
color: rgba(0,0,0,.6);
1616
font-family: Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;
1717
margin: 0 0.25em 0;
18-
padding: 0.2em 0.4em 0.2em;
18+
padding: 2px 4px 2px 4px;
1919
text-transform: none;
2020
text-shadow: none;
2121
line-height: 1em;
@@ -82,7 +82,7 @@
8282
.dot-selected{width: 100%}
8383
.dot-selected>.dlp-label{background: white}
8484
.dot-select{padding: 5px 0 5px 0;background: rgb(43 43 43);border-radius: 0 0 5px 5px;position: relative;}
85-
.dot-select-cover{position: absolute;width: 100%;height: calc(100% - 10px);top:0;left:0;z-index: 9999;}
85+
.dot-select-cover{position: absolute;width: 100%;height: calc(100% - 10px);top:0;left:0;z-index: 1050;}
8686
.dot-select-cascade{
8787
display: flex;
8888
flex-direction: row;
@@ -103,7 +103,6 @@
103103
display: block;
104104
max-width: unset;
105105
min-width: unset;
106-
height: 20px;
107106
line-height: 20px;
108107
margin-bottom: 3px;
109108
position: relative;
@@ -170,7 +169,7 @@
170169
right: 0;
171170
bottom: 0;
172171
left: 0;
173-
z-index: 9999;
172+
z-index: 1050;
174173
overflow: hidden;
175174
-webkit-overflow-scrolling: touch;
176175
outline: 0;

resources/assets/component.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,12 @@ class ComponentDot {
8484
constructor(name, selected, select) {
8585
this.name = name;
8686
this.DOM = document.getElementById(name);
87-
if (!Array.isArray(selected) || !Array.isArray(select)) {
88-
console.error('Dot param selected and select must be array!');
87+
if (!Array.isArray(selected)) {
88+
console.error('Dot param selected must be array!');
89+
return;
90+
}
91+
if(Array.isArray(select) || typeof select !== 'object'){
92+
console.error('Dot param select must be object such as {key:val,key2:val2,...} !');
8993
return;
9094
}
9195
this.make(selected, select);
@@ -417,7 +421,7 @@ class ComponentCascadeDot {
417421
}
418422
}
419423
});
420-
if (to_first_index !== null) this.STACKS[stack].scrollTop = to_first_index * 28;
424+
if (to_first_index !== null) this.STACKS[stack].scrollTop = to_first_index * 27;
421425
if (nodes.length > 0) {
422426
this.selectToParent(nodes, checked);
423427
}
@@ -446,7 +450,7 @@ class ComponentCascadeDot {
446450
D.classList.add('dlp-label-silence');
447451
}
448452
});
449-
if (to_first_index !== null) this.STACKS[stack].scrollTop = to_first_index * 28;
453+
if (to_first_index !== null) this.STACKS[stack].scrollTop = to_first_index * 27;
450454
this.selectToChildren(stack + 1, children);
451455
}
452456

0 commit comments

Comments
 (0)