Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { reads } from '@ember/object/computed';
import { next } from '@ember/runloop';
import DivOverlayLayer from 'ember-leaflet/components/div-overlay-layer';
export default DivOverlayLayer.extend({
leafletOptions: Object.freeze([
'direction', 'permanent', 'sticky', 'interactive', 'opacity'
]),
// if this tooltip is permanent, we need to render the content immediately
shouldRender: reads('permanent'),
createLayer() {
return this.L.tooltip(this.get('options')).setContent(this.get('destinationElement'));
},
didCreateLayer() {
this._addPopupListeners();
},
import { observer } from '@ember/object';
import { later, cancel, next } from '@ember/runloop';
import DivOverlayLayer from 'ember-leaflet/components/div-overlay-layer';
export default DivOverlayLayer.extend({
leafletOptions: Object.freeze([
'maxWidth', 'minWidth', 'maxHeight', 'autoPan', 'autoPanPaddingTopLeft',
'autoPanPaddingBottomRight', 'autoPanPadding', 'keepInView', 'closeButton',
'autoClose'
]),
isOpen() {
// leaflet 1 added an `isOpen` method
return this._layer.isOpen ? this._layer.isOpen() : this._layer._isOpen;
},
/*
* Action to yield to block
*/
closePopup() {