From 27357454b721f99f45fd97d1d89cc95fb21b9a2b Mon Sep 17 00:00:00 2001 From: Simon Seyock Date: Tue, 30 Aug 2016 11:22:56 +0200 Subject: [PATCH 1/7] Added disable feature support --- src/FeaturePopup.js | 17 ++++++++++++----- src/FeatureTooltip.js | 7 +++++-- src/layers/WMSLayer.js | 0 3 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 src/layers/WMSLayer.js diff --git a/src/FeaturePopup.js b/src/FeaturePopup.js index b1efef0..fdebbdf 100644 --- a/src/FeaturePopup.js +++ b/src/FeaturePopup.js @@ -162,6 +162,15 @@ export default class FeaturePopup extends ol.Object { this.map__ = null } + /** + * @param {ol.Feature} feature + * @returns {boolean} + * @private + */ + static filter_ (feature) { + return !feature.get('disabled') && (feature.get('name') || feature.get('description')) + } + /** * @param {G4UMap} map */ @@ -239,12 +248,10 @@ export default class FeaturePopup extends ol.Object { this.$element_.append(this.window_.get$Element()) - let filter = f => f.get('name') || f.get('description') - // feature click map.getDefaultInteractions('singleClick')[ 0 ].on('select', e => { - let selected = e.selected.filter(filter) + let selected = e.selected.filter(FeaturePopup.filter_) if (selected.length) { this.onFeatureClick_(selected[ 0 ]) e.target.getFeatures().remove(selected[ 0 ]) // remove feature to be able to select feature again @@ -255,8 +262,8 @@ export default class FeaturePopup extends ol.Object { // feature hover map.getDefaultInteractions('mouseMove')[ 0 ].on('select', e => { - let selected = e.selected.filter(filter) - let deselected = e.deselected.filter(filter) + let selected = e.selected.filter(FeaturePopup.filter_) + let deselected = e.deselected.filter(FeaturePopup.filter_) if (selected.length) { $(map.getViewport()).addClass(cssClasses.clickable) } else if (deselected.length) { diff --git a/src/FeatureTooltip.js b/src/FeatureTooltip.js index ded5bf1..758955a 100644 --- a/src/FeatureTooltip.js +++ b/src/FeatureTooltip.js @@ -52,6 +52,10 @@ export default class FeatureTooltip { this.$element_.parent().addClass(this.className_ + '-container') } + static filter_ (feature) { + return !feature.get('disabled') && feature.get('name') + } + /** * @param {G4UMap} map */ @@ -63,10 +67,9 @@ export default class FeatureTooltip { if (map) { map.addOverlay(this.overlay_) - let filter = f => f.get('name') let interaction = map.getDefaultInteractions('mouseMove')[0] interaction.on('select', e => { - let selected = e.selected.filter(filter) + let selected = e.selected.filter(FeatureTooltip.filter_) if (selected.length) { this.setFeature(selected[0]) } else { diff --git a/src/layers/WMSLayer.js b/src/layers/WMSLayer.js new file mode 100644 index 0000000..e69de29 From 10867a9cd223b9053a741fe2b8542ef3e8515adc Mon Sep 17 00:00:00 2001 From: Simon Seyock Date: Tue, 30 Aug 2016 13:34:48 +0200 Subject: [PATCH 2/7] Removed problematic naming of setMap method on layers For the purpose of internal storing and accessing of the map inside the layer methods named 'provideMap' and 'getProvidedMap' are introduced. Explanation: The setMap method is used in openlayers to make a layer unmanaged and this is not wanted in this case. The new behaviour reduces management overhead and errors. --- src/G4UMap.js | 2 +- src/configurators/LayerConfigurator.js | 2 +- src/configurators/LayerFactory.js | 6 ++--- src/controls/GeoLocationButton.js | 2 +- src/controls/LayerSelector.js | 2 +- src/controls/MeasurementButton.js | 2 +- src/layers/BaseLayerMixin.js | 4 +-- src/layers/BaseLayerTile.js | 30 ++++----------------- src/layers/EmptyBaseLayer.js | 22 --------------- src/layers/GroupLayer.js | 31 ++++++++------------- src/layers/ImageLayer.js | 34 ++++-------------------- src/layers/LayerLoadProcessCountMixin.js | 2 +- src/layers/ProvideMapMixin.js | 19 +++++++++++++ src/layers/VectorLayer.js | 27 +++---------------- src/layers/WMSLayer.js | 0 15 files changed, 54 insertions(+), 131 deletions(-) create mode 100644 src/layers/ProvideMapMixin.js delete mode 100644 src/layers/WMSLayer.js diff --git a/src/G4UMap.js b/src/G4UMap.js index bc79beb..560dc5e 100644 --- a/src/G4UMap.js +++ b/src/G4UMap.js @@ -495,7 +495,7 @@ export default class G4UMap extends ol.Map { * @param {GroupLayer} groupLayer */ setLayerGroup (groupLayer) { - groupLayer.setMap(this) + groupLayer.provideMap(this) super.setLayerGroup(groupLayer) } diff --git a/src/configurators/LayerConfigurator.js b/src/configurators/LayerConfigurator.js index d4848f8..a7242ee 100644 --- a/src/configurators/LayerConfigurator.js +++ b/src/configurators/LayerConfigurator.js @@ -1,6 +1,6 @@ import ol from 'openlayers' -import GroupLayer from '../layers/GroupLayer' +import {GroupLayer} from '../layers/GroupLayer' import { copyDeep } from '../utilitiesObject' import { checkFor } from '../utilities' import Debug from '../Debug' diff --git a/src/configurators/LayerFactory.js b/src/configurators/LayerFactory.js index c59cb3b..d18cc17 100644 --- a/src/configurators/LayerFactory.js +++ b/src/configurators/LayerFactory.js @@ -2,9 +2,9 @@ import ol from 'openlayers' import {BaseLayerImage, ImageLayer} from '../layers/ImageLayer' import {EmptyBaseLayer} from '../layers/EmptyBaseLayer' -import BaseLayerTile from '../layers/BaseLayerTile' -import GroupLayer from '../layers/GroupLayer' -import VectorLayer from '../layers/VectorLayer' +import {BaseLayerTile} from '../layers/BaseLayerTile' +import {GroupLayer} from '../layers/GroupLayer' +import {VectorLayer} from '../layers/VectorLayer' import SourceServerVector from '../sources/SourceServerVector' import QuerySource from '../sources/QuerySource' import { copyDeep, take } from '../utilitiesObject' diff --git a/src/controls/GeoLocationButton.js b/src/controls/GeoLocationButton.js index d04edb1..521498a 100644 --- a/src/controls/GeoLocationButton.js +++ b/src/controls/GeoLocationButton.js @@ -3,7 +3,7 @@ import $ from 'jquery' import Control from './Control' import { addTooltip } from '../html/html' -import VectorLayer from '../layers/VectorLayer' +import {VectorLayer} from '../layers/VectorLayer' import MessageDisplay from '../MessageDisplay' import {cssClasses} from '../globals' diff --git a/src/controls/LayerSelector.js b/src/controls/LayerSelector.js index 73f1b89..6f78cbf 100644 --- a/src/controls/LayerSelector.js +++ b/src/controls/LayerSelector.js @@ -1,6 +1,6 @@ import $ from 'jquery' -import GroupLayer from '../layers/GroupLayer' +import {GroupLayer} from '../layers/GroupLayer' import ButtonBox from '../html/ButtonBox' import Control from './Control' import { offset } from '../utilities' diff --git a/src/controls/MeasurementButton.js b/src/controls/MeasurementButton.js index 4716455..ac1737a 100644 --- a/src/controls/MeasurementButton.js +++ b/src/controls/MeasurementButton.js @@ -3,7 +3,7 @@ import $ from 'jquery' import Control from './Control' import { cssClasses, keyCodes } from '../globals' -import VectorLayer from '../layers/VectorLayer' +import {VectorLayer} from '../layers/VectorLayer' import '../../less/measurement.less' diff --git a/src/layers/BaseLayerMixin.js b/src/layers/BaseLayerMixin.js index f941589..13a2626 100644 --- a/src/layers/BaseLayerMixin.js +++ b/src/layers/BaseLayerMixin.js @@ -1,4 +1,4 @@ -import GroupLayer from './GroupLayer' +import {GroupLayer} from './GroupLayer' /** * @typedef {object} BaseLayerMixinOptions @@ -8,7 +8,7 @@ import GroupLayer from './GroupLayer' /** * This mixin provides baselayer functionality to any layer */ -export default class BaseLayerMixin { +export class BaseLayerMixin { /** * @param {BaseLayerMixinOptions} options */ diff --git a/src/layers/BaseLayerTile.js b/src/layers/BaseLayerTile.js index 091c692..00c2347 100644 --- a/src/layers/BaseLayerTile.js +++ b/src/layers/BaseLayerTile.js @@ -1,29 +1,9 @@ import ol from 'openlayers' -import BaseLayerMixin from './BaseLayerMixin' -import LayerLoadProcessCountMixin from './LayerLoadProcessCountMixin' +import {BaseLayerMixin} from './BaseLayerMixin' +import {LayerLoadProcessCountMixin} from './LayerLoadProcessCountMixin' import { mixin } from '../utilities' +import {ProvideMapMixin} from './ProvideMapMixin' -export default class BaseLayerTile extends mixin(mixin(ol.layer.Tile, BaseLayerMixin), LayerLoadProcessCountMixin) { - /** - * @param {G4UMap} map - */ - setMap (map) { - /** - * WORKAROUND - * As openlayers identifies managed layers (i.e. layers that are registered via the maps addLayer function) - * by the fact that the setMap method was called and we need a reference to the map in layers contained in a - * grouplayer, we overwrite the setMap method to still have access to the map via the normal way - * @type {G4UMap} - * @private - */ - this.map__ = map - } - - /** - * @returns {G4UMap} - */ - getMap () { - return this.map__ - } -} +export const BaseLayerTile = + mixin(mixin(mixin(ol.layer.Tile, ProvideMapMixin), BaseLayerMixin), LayerLoadProcessCountMixin) diff --git a/src/layers/EmptyBaseLayer.js b/src/layers/EmptyBaseLayer.js index 2457568..79bebbc 100644 --- a/src/layers/EmptyBaseLayer.js +++ b/src/layers/EmptyBaseLayer.js @@ -13,26 +13,4 @@ export class EmptyBaseLayer extends BaseLayerImage { }) super(options) } - - /** - * @param {G4UMap} map - */ - setMap (map) { - /** - * WORKAROUND - * As openlayers identifies managed layers (i.e. layers that are registered via the maps addLayer function) - * by the fact that the setMap method was called and we need a reference to the map in layers contained in a - * grouplayer, we overwrite the setMap method to still have access to the map via the normal way - * @type {G4UMap} - * @private - */ - this.map__ = map - } - - /** - * @returns {G4UMap} - */ - getMap () { - return this.map__ - } } diff --git a/src/layers/GroupLayer.js b/src/layers/GroupLayer.js index 0307b18..70551b8 100644 --- a/src/layers/GroupLayer.js +++ b/src/layers/GroupLayer.js @@ -1,10 +1,12 @@ import ol from 'openlayers' +import {ProvideMapMixin} from './ProvideMapMixin' +import {mixin} from '../utilities' /** * This Class is a Wrap around {ol.layer.Group} providing some extra functionality. This class is normally used for a * category of layers containing them. */ -export default class GroupLayer extends ol.layer.Group { +export class GroupLayer extends mixin(ol.layer.Group, ProvideMapMixin) { /** * @param {object} [options={}] */ @@ -13,42 +15,31 @@ export default class GroupLayer extends ol.layer.Group { this.getLayers().on('add', /** ol.CollectionEvent */ e => { let layer = e.element - if (layer.setMap) { - layer.setMap(this.getMap()) + if (layer.provideMap) { + layer.provideMap(this.getProvidedMap()) } }) this.getLayers().on('remove', /** ol.CollectionEvent */ e => { let layer = e.element - if (layer.setMap) { - layer.setMap(null) + if (layer.provideMap) { + layer.provideMap(null) } }) } /** - * The setMap methods of all contained children are called recursively + * The provideMap methods of all contained children are called recursively * @param {G4UMap} map */ - setMap (map) { - /** - * @type {G4UMap} - * @private - */ - this.map_ = map + provideMap (map) { + super.provideMap(map) this.getLayers().forEach(layer => { - layer.setMap(map) + if (layer.provideMap) { layer.provideMap(map) } }) } - /** - * @returns {G4UMap} - */ - getMap () { - return this.map_ - } - /** * calls callback for every terminal, non-group Layer * @param {Function} callback diff --git a/src/layers/ImageLayer.js b/src/layers/ImageLayer.js index 1795bb6..9fad27d 100644 --- a/src/layers/ImageLayer.js +++ b/src/layers/ImageLayer.js @@ -1,34 +1,10 @@ import ol from 'openlayers' -import LayerLoadProcessCountMixin from './LayerLoadProcessCountMixin' -import BaseLayerMixin from './BaseLayerMixin' +import {LayerLoadProcessCountMixin} from './LayerLoadProcessCountMixin' +import {BaseLayerMixin} from './BaseLayerMixin' import { mixin } from '../utilities' +import {ProvideMapMixin} from './ProvideMapMixin' -export class ImageLayer extends mixin(ol.layer.Image, LayerLoadProcessCountMixin) { - /** - * @param {G4UMap} map - */ - setMap (map) { - /** - * WORKAROUND - * As openlayers identifies managed layers (i.e. layers that are registered via the maps addLayer function) - * by the fact that the setMap method was called and we need a reference to the map in layers contained in a - * grouplayer, we overwrite the setMap method to still have access to the map via the normal way - * @type {G4UMap} - * @private - */ - this.map__ = map - } - - /** - * @returns {G4UMap} - */ - getMap () { - return this.map__ - } -} - -export class BaseLayerImage extends mixin(ImageLayer, BaseLayerMixin) { - -} +export const ImageLayer = mixin(mixin(ol.layer.Image, ProvideMapMixin), LayerLoadProcessCountMixin) +export const BaseLayerImage = mixin(ImageLayer, BaseLayerMixin) diff --git a/src/layers/LayerLoadProcessCountMixin.js b/src/layers/LayerLoadProcessCountMixin.js index c595264..2dcec1a 100644 --- a/src/layers/LayerLoadProcessCountMixin.js +++ b/src/layers/LayerLoadProcessCountMixin.js @@ -1,7 +1,7 @@ /** * A mixin to keep track the amount of load processes a source is currently waiting for */ -export default class LayerLoadProcessCountMixin { +export class LayerLoadProcessCountMixin { initialize () { /** * @type {number} diff --git a/src/layers/ProvideMapMixin.js b/src/layers/ProvideMapMixin.js new file mode 100644 index 0000000..3111164 --- /dev/null +++ b/src/layers/ProvideMapMixin.js @@ -0,0 +1,19 @@ +export class ProvideMapMixin { + /** + * @param {G4UMap} map + */ + provideMap (map) { + /** + * @type {G4UMap|undefined} + * @private + */ + this.providedMap_ = map + } + + /** + * @returns {G4UMap|undefined} + */ + getProvidedMap () { + return this.providedMap_ + } +} diff --git a/src/layers/VectorLayer.js b/src/layers/VectorLayer.js index ad1fc32..a6dbfa6 100644 --- a/src/layers/VectorLayer.js +++ b/src/layers/VectorLayer.js @@ -1,14 +1,15 @@ import ol from 'openlayers' -import LayerLoadProcessCountMixin from './LayerLoadProcessCountMixin' +import {LayerLoadProcessCountMixin} from './LayerLoadProcessCountMixin' import { mixin } from '../utilities' +import {ProvideMapMixin} from './ProvideMapMixin' /** * @typedef {object} VectorLayerOptions * @property {string[]} [mutators=[]] list of mutators (changes featurepopup content) to use for this layer. */ -export default class VectorLayer extends mixin(ol.layer.Vector, LayerLoadProcessCountMixin) { +export class VectorLayer extends mixin(mixin(ol.layer.Vector, ProvideMapMixin), LayerLoadProcessCountMixin) { constructor (options = {}) { super(options) @@ -21,26 +22,4 @@ export default class VectorLayer extends mixin(ol.layer.Vector, LayerLoadProcess // saving text mutators this.set('mutators', options.mutators || []) } - - /** - * @param {G4UMap} map - */ - setMap (map) { - /** - * WORKAROUND - * As openlayers identifies managed layers (i.e. layers that are registered via the maps addLayer function) - * by the fact that the setMap method was called and we need a reference to the map in layers contained in a - * grouplayer, we overwrite the setMap method to still have access to the map via the normal way - * @type {G4UMap} - * @private - */ - this.map__ = map - } - - /** - * @returns {G4UMap} - */ - getMap () { - return this.map__ - } } diff --git a/src/layers/WMSLayer.js b/src/layers/WMSLayer.js deleted file mode 100644 index e69de29..0000000 From 6fb749287f2cc555abc3449b27b2f6c48505b3f4 Mon Sep 17 00:00:00 2001 From: Simon Seyock Date: Tue, 30 Aug 2016 15:56:27 +0200 Subject: [PATCH 3/7] Removed opacity property of features. Use cloneStyle and adjustOpacity methods of styling instead. --- src/Styling.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Styling.js b/src/Styling.js index ae469ac..52b5a6a 100644 --- a/src/Styling.js +++ b/src/Styling.js @@ -345,9 +345,9 @@ export default class Styling { stylePrimitive = curStyles[0] } } - if (this.get('opacity')) { - stylePrimitive = thisRef.adjustColorOpacity(thisRef.cloneStyle(stylePrimitive), this.get('opacity')) - } + // if (this.get('opacity')) { + // stylePrimitive = thisRef.adjustColorOpacity(thisRef.cloneStyle(stylePrimitive), this.get('opacity')) + // } return [stylePrimitive] } From 1406d5ddf092acfc43359a7877c0f7c4759a46d4 Mon Sep 17 00:00:00 2001 From: Simon Seyock Date: Thu, 1 Sep 2016 14:33:43 +0200 Subject: [PATCH 4/7] prevent click selection events if not clicked on canvas --- src/configurators/UIConfigurator.js | 2 +- src/html/Window.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/configurators/UIConfigurator.js b/src/configurators/UIConfigurator.js index e2eecbc..1b5f4f7 100644 --- a/src/configurators/UIConfigurator.js +++ b/src/configurators/UIConfigurator.js @@ -440,7 +440,7 @@ export default class UIConfigurator { } this.map_.addDefaultInteraction('singleClick', new FeatureSelect({ - condition: ol.events.condition.singleClick, + condition: e => ol.events.condition.singleClick(e) && $(e.originalEvent.target).is('canvas'), style: null, multi: true })) diff --git a/src/html/Window.js b/src/html/Window.js index 92c3692..acbee95 100644 --- a/src/html/Window.js +++ b/src/html/Window.js @@ -53,6 +53,7 @@ export default class Window extends ol.Object { * @private */ this.$element_ = $('
').addClass(this.className_) + .on('click', e => e.stopPropagation()) /** * @type {jQuery} From bc7cc88d3402d4083e2c4b67bda6b18c33897c4b Mon Sep 17 00:00:00 2001 From: Simon Seyock Date: Tue, 6 Sep 2016 19:30:43 +0200 Subject: [PATCH 5/7] Fixed timeouts --- tests/selenium/config.js | 2 +- tests/selenium/featuretooltip_spec.js | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/selenium/config.js b/tests/selenium/config.js index 0153f71..ca691bb 100644 --- a/tests/selenium/config.js +++ b/tests/selenium/config.js @@ -1,5 +1,5 @@ export default { - mochaTimeout: 10000, + mochaTimeout: 5000, seleniumTimeout: 5000, testClient: 'http://localhost:8080' } diff --git a/tests/selenium/featuretooltip_spec.js b/tests/selenium/featuretooltip_spec.js index d2a480b..4980b2d 100644 --- a/tests/selenium/featuretooltip_spec.js +++ b/tests/selenium/featuretooltip_spec.js @@ -67,7 +67,6 @@ test.describe('FeatureTooltip', function () { let driver test.before(function () { - this.timeout(config.mochaTimeout) driver = phantomDriver() driver.manage().window().setSize(1200, 800) driver.manage().timeouts().implicitlyWait(config.seleniumTimeout) @@ -79,13 +78,15 @@ test.describe('FeatureTooltip', function () { }) test.it('should show no tooltip if there is no feature under the mouse', function (done) { + this.timeout(config.mochaTimeout) driver.get(config.testClient).then(function () { waitUntilMapReady(driver).then(function () { driver.actions() .mouseMove(driver.findElement(By.className('ol-viewport'))) .perform() .then(function () { - assert(driver.findElement(By.className('g4u-featuretooltip'), 'Tooltip should not be visible').isDisplayed()).equalTo(false) + assert(driver.findElement(By.className('g4u-featuretooltip'), + 'Tooltip should not be visible').isDisplayed()).equalTo(false) done() }) }) @@ -94,6 +95,7 @@ test.describe('FeatureTooltip', function () { test.it('should 1: show a tooltip with the name of the feature if there is a point feature under the mouse and 2:' + ' should hide the tooltip if the mouse moves somewhere else', function (done) { + this.timeout(config.mochaTimeout) driver.get(config.testClient).then(() => { return waitUntilMapReady(driver) }).then(() => { @@ -123,6 +125,7 @@ test.describe('FeatureTooltip', function () { test.it('should 1: show a tooltip with the name of the feature if there is a line feature under the mouse ' + 'and 2: hide the tooltip again if the mouse moves somewhere else', function (done) { + this.timeout(config.mochaTimeout) driver.get(config.testClient).then(() => { return waitUntilMapReady(driver) }).then(() => { @@ -152,6 +155,7 @@ test.describe('FeatureTooltip', function () { test.it('should 1: show a tooltip with the name of the feature if there is a polygon feature under the mouse ' + 'and 2: hide the tooltip again if the mouse moves somewhere else', function (done) { + this.timeout(config.mochaTimeout) driver.get(config.testClient).then(() => { return waitUntilMapReady(driver) }).then(() => { @@ -181,10 +185,12 @@ test.describe('FeatureTooltip', function () { }) test.it('should show the tooltip of a point lying under a polygon', function (done) { + this.timeout(config.mochaTimeout) driver.get(config.testClient).then(function () { waitUntilMapReady(driver).then(() => { return driver.executeScript(stringifyFunctionCall(addLayerWithPointAtMapCenter, 'namePoint', 'description')) }).then(() => { + console.log('map ready') return driver.executeScript( stringifyFunctionCall(addLayerWithPolygonAroundMapCenter, 'namePolygon', 'description', 1000)) }).then(() => { @@ -215,6 +221,7 @@ test.describe('FeatureTooltip', function () { }) test.it('should show the tooltip of a line lying under a polygon', function (done) { + this.timeout(config.mochaTimeout) driver.get(config.testClient).then(() => { waitUntilMapReady(driver).then(() => { return driver.executeScript( From 43bb060023e5d7f7a112b6347ddb1b325cf9cf30 Mon Sep 17 00:00:00 2001 From: Simon Seyock Date: Wed, 7 Sep 2016 15:16:48 +0200 Subject: [PATCH 6/7] New openlayers version --- package.json | 2 +- tests/selenium/featuretooltip_spec.js | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 8d7d5d5..256c864 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "jquery": "3.1.0", "lodash": "4.14.1", "notifyjs-browser": "0.4.2", - "openlayers": "github:KlausBenndorf/ol3#g4u3_3.16", + "openlayers": "github:KlausBenndorf/ol3#g4u3_3.17.1", "proj4": "2.3.14", "strip-json-comments": "2.0.1" }, diff --git a/tests/selenium/featuretooltip_spec.js b/tests/selenium/featuretooltip_spec.js index 4980b2d..7e145a3 100644 --- a/tests/selenium/featuretooltip_spec.js +++ b/tests/selenium/featuretooltip_spec.js @@ -64,6 +64,7 @@ function addLayerWithPolygonAroundMapCenter (name, description, edgeLength) { } test.describe('FeatureTooltip', function () { + this.timeout(config.mochaTimeout) let driver test.before(function () { @@ -78,7 +79,6 @@ test.describe('FeatureTooltip', function () { }) test.it('should show no tooltip if there is no feature under the mouse', function (done) { - this.timeout(config.mochaTimeout) driver.get(config.testClient).then(function () { waitUntilMapReady(driver).then(function () { driver.actions() @@ -95,7 +95,6 @@ test.describe('FeatureTooltip', function () { test.it('should 1: show a tooltip with the name of the feature if there is a point feature under the mouse and 2:' + ' should hide the tooltip if the mouse moves somewhere else', function (done) { - this.timeout(config.mochaTimeout) driver.get(config.testClient).then(() => { return waitUntilMapReady(driver) }).then(() => { @@ -125,7 +124,6 @@ test.describe('FeatureTooltip', function () { test.it('should 1: show a tooltip with the name of the feature if there is a line feature under the mouse ' + 'and 2: hide the tooltip again if the mouse moves somewhere else', function (done) { - this.timeout(config.mochaTimeout) driver.get(config.testClient).then(() => { return waitUntilMapReady(driver) }).then(() => { @@ -155,7 +153,6 @@ test.describe('FeatureTooltip', function () { test.it('should 1: show a tooltip with the name of the feature if there is a polygon feature under the mouse ' + 'and 2: hide the tooltip again if the mouse moves somewhere else', function (done) { - this.timeout(config.mochaTimeout) driver.get(config.testClient).then(() => { return waitUntilMapReady(driver) }).then(() => { @@ -185,7 +182,6 @@ test.describe('FeatureTooltip', function () { }) test.it('should show the tooltip of a point lying under a polygon', function (done) { - this.timeout(config.mochaTimeout) driver.get(config.testClient).then(function () { waitUntilMapReady(driver).then(() => { return driver.executeScript(stringifyFunctionCall(addLayerWithPointAtMapCenter, 'namePoint', 'description')) @@ -221,7 +217,6 @@ test.describe('FeatureTooltip', function () { }) test.it('should show the tooltip of a line lying under a polygon', function (done) { - this.timeout(config.mochaTimeout) driver.get(config.testClient).then(() => { waitUntilMapReady(driver).then(() => { return driver.executeScript( From 8bfd278a4733b22df4898a2932e9b0a4ab716f09 Mon Sep 17 00:00:00 2001 From: Simon Seyock Date: Wed, 7 Sep 2016 15:22:18 +0200 Subject: [PATCH 7/7] Removed Comment --- src/Styling.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Styling.js b/src/Styling.js index 52b5a6a..b9419dc 100644 --- a/src/Styling.js +++ b/src/Styling.js @@ -345,9 +345,6 @@ export default class Styling { stylePrimitive = curStyles[0] } } - // if (this.get('opacity')) { - // stylePrimitive = thisRef.adjustColorOpacity(thisRef.cloneStyle(stylePrimitive), this.get('opacity')) - // } return [stylePrimitive] }