Skip to content

Commit

Permalink
Merge pull request #6841 from hisayan/fix-userdrawing-drag
Browse files Browse the repository at this point in the history
fix UserDrawing
  • Loading branch information
na9da authored Aug 28, 2023
2 parents b14835b + 79e794a commit 5d10080
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#### next release (8.3.3)

- Fixes broken point dragging interaction for user drawing in 3d-mode.
- [The next improvement]

#### 8.3.2 - 2023-08-11
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ The following people have contributed to TerriaJS:
- [Zoran Kokeza](https://github.com/zoran995)
- [J. Garcia](https://github.com/ctwhome)
- [Yusuke Kiuchi](https://github.com/ykiu)
- [Tomoyuki Hisada](https://github.com/hisayan)
4 changes: 2 additions & 2 deletions lib/Map/DragPoints/CesiumDragPoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ CesiumDragPoints.prototype.setUp = function () {
if (
!defined(this._terria.cesium) ||
!defined(this._terria.cesium.scene) ||
!defined(this._terria.cesium.viewer)
!defined(this._terria.cesium.cesiumWidget)
) {
// Test context or something has gone *so* badly wrong
return;
}
this._scene = this._terria.cesium.scene;
this._viewer = this._terria.cesium.viewer;
this._viewer = this._terria.cesium.cesiumWidget;
this._mouseHandler = new ScreenSpaceEventHandler(this._scene.canvas, false);

var that = this;
Expand Down
4 changes: 2 additions & 2 deletions lib/Map/DragPoints/DragPoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var defined = require("terriajs-cesium/Source/Core/defined").default;
var CesiumDragPoints = require("./CesiumDragPoints");
var LeafletDragPoints = require("./LeafletDragPoints");
var ViewerMode = require("../../Models/ViewerMode");
var ViewerMode = require("../../Models/ViewerMode").default;

/**
* Callback for when a point is moved.
Expand Down Expand Up @@ -79,7 +79,7 @@ DragPoints.prototype._createDragPointsHelper = function (pointMovedCallback) {
if (defined(this._dragPointsHelper)) {
this._dragPointsHelper.destroy();
}
if (this._terria.viewerMode === ViewerMode.Leaflet) {
if (this._terria.mainViewer.viewerMode === ViewerMode.Leaflet) {
this._dragPointsHelper = new LeafletDragPoints(
this._terria,
pointMovedCallback
Expand Down

0 comments on commit 5d10080

Please sign in to comment.