increase performance open filters
parent
6dff083cd2
commit
f28c6be7ed
|
@ -26,6 +26,14 @@ FilterDirective = () ->
|
||||||
else if scope.vm.filtersForm.$dirty
|
else if scope.vm.filtersForm.$dirty
|
||||||
unwatch()
|
unwatch()
|
||||||
|
|
||||||
|
attrs.$observe "open", (open) ->
|
||||||
|
open = scope.$eval(open)
|
||||||
|
|
||||||
|
if open
|
||||||
|
el.addClass('open')
|
||||||
|
else
|
||||||
|
el.removeClass('open')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
scope: {
|
scope: {
|
||||||
onChangeQ: "&",
|
onChangeQ: "&",
|
||||||
|
|
|
@ -7,6 +7,8 @@ tg-filter {
|
||||||
padding: 1rem 0;
|
padding: 1rem 0;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
transform: translateX(-260px);
|
||||||
|
transition-duration: .5s;
|
||||||
width: 260px;
|
width: 260px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
.filters-applied {
|
.filters-applied {
|
||||||
|
@ -28,18 +30,7 @@ tg-filter {
|
||||||
right: .7rem;
|
right: .7rem;
|
||||||
top: .7rem;
|
top: .7rem;
|
||||||
}
|
}
|
||||||
&.ng-hide-add {
|
&.open {
|
||||||
transform: translateX(0);
|
|
||||||
transition-duration: .5s;
|
|
||||||
}
|
|
||||||
&.ng-hide-add-active {
|
|
||||||
transform: translateX(-260px);
|
|
||||||
}
|
|
||||||
&.ng-hide-remove {
|
|
||||||
transform: translateX(-260px);
|
|
||||||
transition-duration: .5s;
|
|
||||||
}
|
|
||||||
&.ng-hide-remove-active {
|
|
||||||
transform: translateX(0);
|
transform: translateX(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ div.wrapper(tg-kanban, ng-controller="KanbanController as ctrl"
|
||||||
|
|
||||||
section.main.kanban
|
section.main.kanban
|
||||||
tg-filter(
|
tg-filter(
|
||||||
ng-show="ctrl.openFilter"
|
open="{{ctrl.openFilter}}"
|
||||||
q="ctrl.filterQ"
|
q="ctrl.filterQ"
|
||||||
filters="ctrl.filters"
|
filters="ctrl.filters"
|
||||||
custom-filters="ctrl.customFilters"
|
custom-filters="ctrl.customFilters"
|
||||||
|
|
|
@ -5,7 +5,7 @@ div.wrapper(tg-taskboard, ng-controller="TaskboardController as ctrl",
|
||||||
tg-project-menu
|
tg-project-menu
|
||||||
section.main.taskboard
|
section.main.taskboard
|
||||||
tg-filter(
|
tg-filter(
|
||||||
ng-show="ctrl.openFilter"
|
open="{{ctrl.openFilter}}"
|
||||||
q="ctrl.filterQ"
|
q="ctrl.filterQ"
|
||||||
filters="ctrl.filters"
|
filters="ctrl.filters"
|
||||||
custom-filters="ctrl.customFilters"
|
custom-filters="ctrl.customFilters"
|
||||||
|
|
|
@ -3,4 +3,7 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 260px;
|
width: 260px;
|
||||||
}
|
}
|
||||||
|
tg-filter {
|
||||||
|
transform: translateX(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue