Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions app/util/Layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,23 +118,10 @@ Ext.define('CpsiMapview.util.Layer', {
Ext.log.warn('Layer type not recognized (updateLayerNodeUI)');
}

const originalGlyph = layer.get('_origTreeConf')
? layer.get('_origTreeConf').glyph
: null;
const expandedGlyph = 'f0b0';
if (hasFilters) {
// only set the glyph and class if needed - better for performance
if (node.get('glyph') !== expandedGlyph) {
node.set('glyph', expandedGlyph);
node.addCls('cpsi-tree-node-filtered');
}
node.addCls('cpsi-tree-node-filtered');
} else {
// only set the glyph and class if needed - better for performance
if (node.get('glyph') !== originalGlyph) {
// revert to the original glyph if set on the layer
node.set('glyph', originalGlyph);
node.removeCls('cpsi-tree-node-filtered');
}
node.removeCls('cpsi-tree-node-filtered');
}

if (triggerUIUpdate) {
Expand Down
19 changes: 16 additions & 3 deletions sass/src/view/LayerTree.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,23 @@
font-style: italic;
font-weight: bold;

.x-tree-checkbox:after {
content: "\f0b0";
font-family: "Font Awesome 5 Free" !important;
.x-tree-checkbox {
position: relative; // anchor point for the badge
margin-right: 14px; // make room so the badge doesn't collide with .x-tree-icon
}

.x-tree-checkbox:after {
content: "\f0b0";
position: absolute;
left: 100%; // immediately to the right of the checkbox box
top: 50%;
transform: translateY(-50%);
margin-left: 2px; // add small gap between checkbox and icon
font-family: 'Font Awesome 5 Free' !important; // Solid — \f0b0 has no Regular version
font-size: 12px; // smaller than the tree icon
line-height: 1;
pointer-events: none; // don't let it handle clicks meant for the checkbox
}
}

.cpsi-tree-node-baselayer {
Expand Down
Loading