Revize 219cf56f
Přidáno uživatelem Pavel Fidranský před asi 6 roky(ů)
sources/imiger-core/src/main/webapp/css/components/sidebar.css | ||
---|---|---|
169 | 169 |
|
170 | 170 |
.sidebar .node--found .vertex-name, |
171 | 171 |
.sidebar .node--found .group-name { |
172 |
background-color: orange;
|
|
172 |
box-shadow: 0 0 16px 2px #ffa500;
|
|
173 | 173 |
} |
174 | 174 |
|
175 | 175 |
.sidebar .node--highlighted .vertex-name { |
sources/imiger-core/src/main/webapp/css/components/viewport.css | ||
---|---|---|
47 | 47 |
stroke-width: 1; |
48 | 48 |
} |
49 | 49 |
|
50 |
.viewport .node--found > rect { |
|
51 |
fill: orange; |
|
52 |
} |
|
53 |
|
|
54 | 50 |
.viewport .node--dimmed { |
55 | 51 |
opacity: 0.5; |
56 | 52 |
} |
sources/imiger-core/src/main/webapp/js/components/node.js | ||
---|---|---|
151 | 151 |
this._isFound = newValue; |
152 | 152 |
|
153 | 153 |
if (newValue) { |
154 |
this._rootElement.classList.add('node--found'); |
|
154 |
if (this.isExcluded) { |
|
155 |
this._rootElement.classList.add('node--found'); |
|
156 |
} else { |
|
157 |
this._rootElement.setAttribute('filter', 'url(#node--found)'); |
|
158 |
} |
|
155 | 159 |
} else { |
156 |
this._rootElement.classList.remove('node--found'); |
|
160 |
if (this.isExcluded) { |
|
161 |
this._rootElement.classList.remove('node--found'); |
|
162 |
} else { |
|
163 |
this._rootElement.removeAttribute('filter'); |
|
164 |
} |
|
157 | 165 |
} |
158 | 166 |
} |
159 | 167 |
|
sources/imiger-core/src/main/webapp/js/components/viewport.js | ||
---|---|---|
183 | 183 |
'stop-color': '#5896ff', |
184 | 184 |
}), |
185 | 185 |
]), |
186 |
// drop shadow for found nodes |
|
187 |
DOM.s('filter', { |
|
188 |
id: 'node--found', |
|
189 |
width: '200%', |
|
190 |
height: '200%', |
|
191 |
x: '-50%', |
|
192 |
y: '-50%', |
|
193 |
}, [ |
|
194 |
// use feDropShadow once supported in all major browsers |
|
195 |
DOM.s('feGaussianBlur', { |
|
196 |
in: 'SourceAlpha', |
|
197 |
stdDeviation: '16 8', |
|
198 |
}), |
|
199 |
DOM.s('feOffset', { |
|
200 |
dx: 0, |
|
201 |
dy: 0, |
|
202 |
result: 'offsetBlur', |
|
203 |
}), |
|
204 |
DOM.s('feFlood', { |
|
205 |
'flood-color': '#ffa500', |
|
206 |
'flood-opacity': 1, |
|
207 |
}), |
|
208 |
DOM.s('feComposite', { |
|
209 |
in2: 'offsetBlur', |
|
210 |
operator: 'in', |
|
211 |
}), |
|
212 |
DOM.s('feMerge', {}, [ |
|
213 |
DOM.s('feMergeNode'), |
|
214 |
DOM.s('feMergeNode', { |
|
215 |
in: 'SourceGraphic', |
|
216 |
}), |
|
217 |
]), |
|
218 |
]), |
|
186 | 219 |
]); |
187 | 220 |
graph.appendChild(this._definitions); |
188 | 221 |
|
sources/imiger-core/src/main/webapp/tests/search.robot | ||
---|---|---|
25 | 25 |
# check counter of found nodes |
26 | 26 |
${found}= Get Text ${searchCounter} |
27 | 27 |
Should Be Equal As Strings ${found} 2 |
28 |
# check CSS classes of found nodes
|
|
29 |
Element Should Have Class ${vertex2015} node--found
|
|
30 |
Element Should Have Class ${vertex2039} node--found
|
|
28 |
# check found nodes |
|
29 |
Element Attribute Value Should Be ${vertex2015} filter url(#node--found)
|
|
30 |
Element Attribute Value Should Be ${vertex2039} filter url(#node--found)
|
|
31 | 31 |
|
32 | 32 |
|
33 | 33 |
Search vertex using button |
... | ... | |
36 | 36 |
# check counter of found nodes |
37 | 37 |
${found}= Get Text ${searchCounter} |
38 | 38 |
Should Be Equal As Strings ${found} 2 |
39 |
# check CSS classes of found nodes
|
|
40 |
Element Should Have Class ${vertex2015} node--found
|
|
41 |
Element Should Have Class ${vertex2039} node--found
|
|
39 |
# check found nodes |
|
40 |
Element Attribute Value Should Be ${vertex2015} filter url(#node--found)
|
|
41 |
Element Attribute Value Should Be ${vertex2039} filter url(#node--found)
|
|
42 | 42 |
|
43 | 43 |
|
44 | 44 |
Reset search using escape key |
... | ... | |
50 | 50 |
${found}= Get Text ${searchCounter} |
51 | 51 |
Should Be Equal As Strings ${found} 0 |
52 | 52 |
# check that no nodes are found |
53 |
Element Should Not Have Class ${vertex2015} node--found
|
|
54 |
Element Should Not Have Class ${vertex2039} node--found
|
|
53 |
Element Should Not Have Attribute ${vertex2015} filter
|
|
54 |
Element Should Not Have Attribute ${vertex2039} filter
|
|
55 | 55 |
|
56 | 56 |
|
57 | 57 |
Reset search using counter click |
... | ... | |
62 | 62 |
${found}= Get Text ${searchCounter} |
63 | 63 |
Should Be Equal As Strings ${found} 0 |
64 | 64 |
# check that no nodes are found |
65 |
Element Should Not Have Class ${vertex2015} vertex--found |
|
66 |
Element Should Not Have Class ${vertex2039} vertex--found |
|
65 |
Element Should Not Have Attribute ${vertex2015} filter |
|
66 |
Element Should Not Have Attribute ${vertex2039} filter |
Také k dispozici: Unified diff
re #16: found node is marked with drop shadow instead of background