diff --git a/CHANGELOG.md b/CHANGELOG.md index f5b4b54..dd40dc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ Versions are numbered "major.minor.patch", with the `master` branch being "major All changes without author are by [Ilya Zverev](https://github.com/Zverik). +## 1.2.1-dev (master) + +### Improvements + +* Editor window is always reopened on subsequent `editorWindow` calls, bringing it to the foreground. + +### Bugfixes + ## 1.2.0 (2013-12-25) ### Notable Changes diff --git a/package.json b/package.json index 7e1eebd..2dfc663 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapbbcode", - "version": "1.2.0", + "version": "1.2.1-dev", "description": "JavaScript library for [map] BBCode parsing, displaying and editing", "devDependencies": { "leaflet": "git://github.com/Leaflet/Leaflet.git", diff --git a/src/MapBBCodeUI.Editor.js b/src/MapBBCodeUI.Editor.js index 07c9f2e..af9dcbd 100644 --- a/src/MapBBCodeUI.Editor.js +++ b/src/MapBBCodeUI.Editor.js @@ -340,6 +340,8 @@ window.MapBBCode.include({ windowPath = this.options.windowPath, url = windowPath.substring(windowPath.length - 1) == '/' ? windowPath + 'mapbbcode-window.html' : windowPath; - window.open(url, 'mapbbcode_editor', features + ',' + featSize); + if( this._edWnd && !this._edWnd.closed ) + this._edWnd.close(); + this._edWnd = window.open(url, 'mapbbcode_editor', features + ',' + featSize); } }); diff --git a/src/layers/LayerList.js b/src/layers/LayerList.js index 022c6a8..eaa74e5 100644 --- a/src/layers/LayerList.js +++ b/src/layers/LayerList.js @@ -11,18 +11,13 @@ window.layerList = { "OpenStreetMap FR": "L.tileLayer('http://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', { subdomains: 'abc', attribution: 'Map © OpenStreetMap | Tiles © OSM France', minZoom: 0, maxZoom: 20 })", "Hike & Bike": "L.layerGroup([ L.tileLayer('http://toolserver.org/tiles/hikebike/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Colin Marquardt' } ), L.tileLayer('http://toolserver.org/~cmarqu/hill/{z}/{x}/{y}.png', { minZoom: 0, maxZoom: 17 }) ])", "CycleMap": "L.tileLayer('http://{s}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Andy Allan', minZoom: 0, maxZoom: 18 })", - "OpenMapSurfer": "L.tileLayer('http://openmapsurfer.uni-hd.de/tiles/roads/x={x}&y={y}&z={z}', { attribution: 'Map © OSM | Tiles © GIScience Heidelberg', minZoom: 0, maxZoom: 19 })", - "OpenMapSurfer Contour": "L.layerGroup([ L.tileLayer('http://openmapsurfer.uni-hd.de/tiles/roads/x={x}&y={y}&z={z}', { attribution: 'Map © OSM | Tiles © GIScience Heidelberg', minZoom: 0, maxZoom: 19 }), L.tileLayer('http://openmapsurfer.uni-hd.de/tiles/asterc/x={x}&y={y}&z={z}') ])", - "OpenMapSurfer Grayscale": "L.tileLayer('http://openmapsurfer.uni-hd.de/tiles/roadsg/x={x}&y={y}&z={z}', { attribution: 'Map © OSM | Tiles © GIScience Heidelberg', minZoom: 0, maxZoom: 19 })", "Humanitarian": "L.tileLayer('http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', { attribution: 'Map © OpenStreetMap | Tiles © Humanitarian OSM Team', minZoom: 0, maxZoom: 19 })", "Transport": "L.tileLayer('http://{s}.tile2.opencyclemap.org/transport/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Andy Allan', minZoom: 0, maxZoom: 18 })", "Landscape": "L.tileLayer('http://{s}.tile3.opencyclemap.org/landscape/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Andy Allan', minZoom: 0, maxZoom: 18 })", "Outdoors": "L.tileLayer('http://{s}.tile.thunderforest.com/outdoors/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Andy Allan', minZoom: 0, maxZoom: 18 })", - "MapQuest Open": "L.tileLayer('http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpeg', { attribution: 'Map © OSM | Tiles © MapQuest', subdomains: '1234', minZoom: 0, maxZoom: 18 })", "Stamen Toner": "L.tileLayer('http://{s}.tile.stamen.com/toner/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Stamen Design', minZoom: 0, maxZoom: 20 })", "Stamen Toner Lite": "L.tileLayer('http://{s}.tile.stamen.com/toner-lite/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Stamen Design', minZoom: 0, maxZoom: 20 })", "Stamen Watercolor": "L.tileLayer('http://{s}.tile.stamen.com/watercolor/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Stamen Design', minZoom: 3, maxZoom: 16 })", - "Cloudmade": "L.tileLayer('http://{s}.tile.cloudmade.com/{apiKey}/{styleID}/256/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © CloudMade', apiKey: '{key:http://account.cloudmade.com/register}', styleID: '1', minZoom: 0, maxZoom: 18 })", "MapBox": "L.tileLayer('http://{s}.tiles.mapbox.com/v3/{key:https://www.mapbox.com/#signup}/{z}/{x}/{y}.png', { subdomains: 'abcd', attribution: 'Map © OpenStreetMap' })" },