diff --git a/Apps/Sandcastle/gallery/Imagery Layers Split.html b/Apps/Sandcastle/gallery/Imagery Layers Split.html index adec29907a4a..ff9594838cea 100644 --- a/Apps/Sandcastle/gallery/Imagery Layers Split.html +++ b/Apps/Sandcastle/gallery/Imagery Layers Split.html @@ -26,7 +26,7 @@ left: 50%; top: 0px; background-color: #D3D3D3; - width: 2px; + width: 5px; height: 100%; z-index: 9999; } @@ -53,7 +53,8 @@ imageryProvider : new Cesium.ArcGisMapServerImageryProvider({ url : 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer' }), - baseLayerPicker : false + baseLayerPicker : false, + infoBox : false }); var layers = viewer.imageryLayers; @@ -68,27 +69,37 @@ var slider = document.getElementById('slider'); viewer.scene.imagerySplitPosition = (slider.offsetLeft) / slider.parentElement.offsetWidth; -var dragStartX = 0; +var handler = new Cesium.ScreenSpaceEventHandler(slider); -document.getElementById('slider').addEventListener('mousedown', mouseDown, false); -window.addEventListener('mouseup', mouseUp, false); +var moveActive = false; -function mouseUp() { - window.removeEventListener('mousemove', sliderMove, true); -} +function move(movement) { + if(!moveActive) { + return; + } -function mouseDown(e) { - var slider = document.getElementById('slider'); - dragStartX = e.clientX - slider.offsetLeft; - window.addEventListener('mousemove', sliderMove, true); + var relativeOffset = movement.endPosition.x ; + var splitPosition = (slider.offsetLeft + relativeOffset) / slider.parentElement.offsetWidth; + slider.style.left = 100.0 * splitPosition + '%'; + viewer.scene.imagerySplitPosition = splitPosition; } -function sliderMove(e) { - var slider = document.getElementById('slider'); - var splitPosition = (e.clientX - dragStartX) / slider.parentElement.offsetWidth; - slider.style.left = 100.0 * splitPosition + "%"; - viewer.scene.imagerySplitPosition = splitPosition; -} +handler.setInputAction(function() { + moveActive = true; +}, Cesium.ScreenSpaceEventType.LEFT_DOWN); +handler.setInputAction(function() { + moveActive = true; +}, Cesium.ScreenSpaceEventType.PINCH_START); + +handler.setInputAction(move, Cesium.ScreenSpaceEventType.MOUSE_MOVE); +handler.setInputAction(move, Cesium.ScreenSpaceEventType.PINCH_MOVE); + +handler.setInputAction(function() { + moveActive = false; +}, Cesium.ScreenSpaceEventType.LEFT_UP); +handler.setInputAction(function() { + moveActive = false; +}, Cesium.ScreenSpaceEventType.PINCH_END); //Sandcastle_End diff --git a/CHANGES.md b/CHANGES.md index 666d114b9b18..fa2be9350acc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,22 +1,28 @@ Change Log ========== +### 1.40 - 2017-12-01 + +* Added ability to support touch event in Imagery Layers Split demo application. [#5948](https://github.com/AnalyticalGraphicsInc/cesium/pull/5948) + ### 1.39 - 2017-11-01 -* Added support for right-to-left language detection in labels, currently Hebrew and Arabic are supported. To enable it, set `Cesium.Label.enableRightToLeftDetection = true` at the beginning of your application. [#5771](https://github.com/AnalyticalGraphicsInc/cesium/pull/5771) -* Added the ability to load Cesium's assets from the local file system if security permissions allow it. [#5830](https://github.com/AnalyticalGraphicsInc/cesium/issues/5830) -* Added function that inserts missing namespace declarations into KML files. [#5860](https://github.com/AnalyticalGraphicsInc/cesium/pull/5860) -* Added support for the layer.json `parentUrl` property in `CesiumTerrainProvider` to allow for compositing of tilesets. +* Cesium now officially supports webpack. See our [Integrating Cesium and webpack blog post](https://cesium.com/blog/2017/10/18/cesium-and-webpack/) for more details. +* Added support for right-to-left language detection in labels, currently Hebrew and Arabic are supported. To enable it, set `Cesium.Label.enableRightToLeftDetection = true` at the start of your application. [#5771](https://github.com/AnalyticalGraphicsInc/cesium/pull/5771) +* Fixed handling of KML files with missing `xsi` namespace declarations. [#5860](https://github.com/AnalyticalGraphicsInc/cesium/pull/5860) * Fixed a bug that caused KML ground overlays to appear distorted when rotation was applied. [#5914](https://github.com/AnalyticalGraphicsInc/cesium/issues/5914) -* Added two new properties to `ImageryLayer` that allow for adjusting the texture sampler used for up- and down-sampling of image tiles, namely `minificationFilter` and `magnificationFilter` with possible values `LINEAR` (the default) and `NEAREST` defined in `TextureMinificationFilter` and `TextureMagnificationFilter`. [#5846](https://github.com/AnalyticalGraphicsInc/cesium/issues/5846) -* The enums `TextureMinificationFilter` and `TextureMagnificationFilter` have been made public to support the new texture filter properties mentioned above. -* KML files load when a Network Link fails [#5871](https://github.com/AnalyticalGraphicsInc/cesium/pull/5871) -* Adds `invertClassification` and `invertClassificationColor` to `Scene`. When `invertClassification` is `true`, any 3D Tiles geometry that is not classified by a `ClassificationPrimitive` or `GroundPrimitive` will have its color multiplied by `invertClassificationColor`. [#5836](https://github.com/AnalyticalGraphicsInc/cesium/pull/5836) -* Added `eyeSeparation` and `focalLength` properties to `Scene` to configure VR settings. [#5917](https://github.com/AnalyticalGraphicsInc/cesium/pull/5917) +* Fixed a bug where KML placemarks with no specified icon would be displayed with default icon. [#5819](https://github.com/AnalyticalGraphicsInc/cesium/issues/5819) +* Changed KML loading to ignore NetworkLink failures and continue to load the rest of the document. [#5871](https://github.com/AnalyticalGraphicsInc/cesium/pull/5871) +* Added the ability to load Cesium's assets from the local file system if security permissions allow it. [#5830](https://github.com/AnalyticalGraphicsInc/cesium/issues/5830) +* Added two new properties to `ImageryLayer` that allow for adjusting the texture sampler used for up and down-sampling of imagery tiles, namely `minificationFilter` and `magnificationFilter` with possible values `LINEAR` (the default) and `NEAREST` defined in `TextureMinificationFilter` and `TextureMagnificationFilter`. [#5846](https://github.com/AnalyticalGraphicsInc/cesium/issues/5846) +* Fixed flickering artifacts with 3D Tiles tilesets with thin walls. [#5940](https://github.com/AnalyticalGraphicsInc/cesium/pull/5940) +* Fixed bright fog when terrain lighting is enabled and added `Fog.minimumBrightness` to affect how bright the fog will be when in complete darkness. [#5934](https://github.com/AnalyticalGraphicsInc/cesium/pull/5934) +* Fixed using arrow keys in geocoder widget to select search suggestions. [#5943](https://github.com/AnalyticalGraphicsInc/cesium/issues/5943) +* Added support for the layer.json `parentUrl` property in `CesiumTerrainProvider` to allow for compositing of tilesets. [#5864](https://github.com/AnalyticalGraphicsInc/cesium/pull/5864) +* Added `invertClassification` and `invertClassificationColor` to `Scene`. When `invertClassification` is `true`, any 3D Tiles geometry that is not classified by a `ClassificationPrimitive` or `GroundPrimitive` will have its color multiplied by `invertClassificationColor`. [#5836](https://github.com/AnalyticalGraphicsInc/cesium/pull/5836) * Added `customTags` property to the UrlTemplateImageryProvider to allow custom keywords in the template URL. [#5696](https://github.com/AnalyticalGraphicsInc/cesium/pull/5696) +* Added `eyeSeparation` and `focalLength` properties to `Scene` to configure VR settings. [#5917](https://github.com/AnalyticalGraphicsInc/cesium/pull/5917) * Improved CZML Reference Properties example [#5754](https://github.com/AnalyticalGraphicsInc/cesium/pull/5754) -* Fixed bug with placemarks in imported KML: placemarks with no specified icon would be displayed with default icon. [#5819](https://github.com/AnalyticalGraphicsInc/cesium/issues/5819) -* Fixed bright fog when terrain lighting is enabled and added `Fog.minimumBrightness` to affect how bright the fog will be when in complete darkness. [#5934](https://github.com/AnalyticalGraphicsInc/cesium/pull/5934) ### 1.38 - 2017-10-02