Commit 9aef7737 authored by Alexander's avatar Alexander

add a clicklistener to the toggle for the bli icons

parent 70e842c7
......@@ -8,7 +8,7 @@ import { isContentQueryHost } from '@angular/core/src/render3/util';
//import {defaults as defaultControls,Control} from 'ol/control.js'
export class TestControl extends Control{
export class FilterBLIDimensionsControl extends Control{
//our control is already in the DOM
//but due to styling issues is not shown correctly
......@@ -37,15 +37,17 @@ export class TestControl extends Control{
for(let i=0;i<arr.length;i++){
element.appendChild(this.make_bli_icon('bliicon-'+arr[i]+'.svg'));
}
//element.appendChild(this.make_bli_icon('bliicon-community.svg'));
//nelement.appendChild(this.make_bli_icon('bliicon-work.svg'));
//element.appendChild(this.make_bli_icon('bliicon-security.svg'));
if(i==6){
let expandToggle = document.createElement('div');
expandToggle.setAttribute('style','border-radius:20px;');
expandToggle.className='btn btn-primary m-3';
//let debug = document.createElement('img');
//debug.setAttribute('src','assets/img/footer/buerger_forschung.jpg');
expandToggle.innerText='< Dimensionen des Guten Lebens >';
expandToggle.addEventListener('click',()=>this.clickToggleFilterIcons());
//element.appendChild(debug);
element.appendChild(expandToggle);
}
}
Control.call(this,{
element:element,
......@@ -66,4 +68,8 @@ export class TestControl extends Control{
console.log('click');
//console.log(this.getMap());
}
clickToggleFilterIcons(){
console.log('click toggle filter icons');
}
}
\ No newline at end of file
......@@ -31,7 +31,7 @@ import { OsmNodeService } from './osm-node.service';
//import ol from 'ol';
import {TestControl} from '../alexander/TestControl';
import {FilterBLIDimensionsControl} from '../alexander/FilterBLIDimensonsControl';
......@@ -560,7 +560,7 @@ export class MapService {
})
])
*/
.extend([this.attribution,new TestControl(
.extend([this.attribution,new FilterBLIDimensionsControl(
{
source:this.source,
target:'map'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment