Added Docker stuff.
This commit is contained in:
40
components/legend/legend.component.js
Normal file
40
components/legend/legend.component.js
Normal file
@@ -0,0 +1,40 @@
|
||||
'use strict';
|
||||
|
||||
angular
|
||||
.module('sloDialectsApp')
|
||||
.component('dialectLegend', {
|
||||
templateUrl: 'components/legend/legend.template.html',
|
||||
controller: ['geojsonService', '$scope', '$rootScope', 'dialects', function LegendController(geojsonService, $scope, $rootScope, dialects) {
|
||||
|
||||
var vm = this;
|
||||
vm.dialectGroups = dialects;
|
||||
vm.mouseEnter = mouseEnter;
|
||||
vm.mouseLeave = mouseLeave;
|
||||
|
||||
function mouseEnter(id, type){
|
||||
var hoverWeight = 5;
|
||||
if(id.indexOf('narecna_skupina') > -1){
|
||||
$rootScope.layersArr[id].bringToFront();
|
||||
}
|
||||
$rootScope.layersArr[id].setStyle({
|
||||
weight: hoverWeight,
|
||||
color: "#b23636"
|
||||
});
|
||||
}
|
||||
|
||||
function mouseLeave(elem, type){
|
||||
var id = elem.id;
|
||||
var resetWeight = 1;
|
||||
if(id.indexOf('narecna_skupina') > -1){
|
||||
$rootScope.layersArr[id].bringToBack();
|
||||
resetWeight = 3;
|
||||
}
|
||||
$rootScope.layersArr[id].setStyle({
|
||||
weight: resetWeight,
|
||||
color: "#000000"
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}]
|
||||
});
|
||||
18
components/legend/legend.template.html
Normal file
18
components/legend/legend.template.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<div id="legenda" class="hidden-mobile">
|
||||
|
||||
<div ng-repeat="(id, dialectGroup) in $ctrl.dialectGroups" id="{{id}}">
|
||||
<strong ng-mouseover="$ctrl.mouseEnter(id, 'group')" ng-mouseleave="$ctrl.mouseLeave(this)" class="pointer">{{ dialectGroup.name }}</strong>
|
||||
<div class="legenda-box"></div>
|
||||
<div class="legenda-dialects">
|
||||
<div ng-repeat="(id, dialect) in dialectGroup.dialects" class="legenda-dialect" >
|
||||
<span ng-mouseover="$ctrl.mouseEnter(id, 'dialect')" ng-mouseleave="$ctrl.mouseLeave(this)" class="pointer">{{ dialect.name }}</span>
|
||||
<div class="legenda-subdialects">
|
||||
<div ng-repeat="(id, subdialect) in dialect.subdialects" class="legenda-subdialect">
|
||||
<i ng-mouseover="$ctrl.mouseEnter(id, 'subdialect')" ng-mouseleave="$ctrl.mouseLeave(this)" class="pointer">{{ subdialect.name }}</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user