Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed May 2, 2019
1 parent 9fac938 commit c987eff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion buildtools/webpack.commons.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ const config = function(hardSourceConfig, babelLoaderCacheDirectory) {
'gmf': path.resolve(__dirname, '../contribs/gmf/src'),
'goog/asserts': path.resolve(__dirname, '../src/goog.asserts.js'),
'goog/asserts.js': path.resolve(__dirname, '../src/goog.asserts.js'),
'jsts': 'jsts/org/locationtech/jts',
'ol/ol.css': 'openlayers/css/ol.css',
'ol': 'openlayers/src/ol',
'olcs': 'ol-cesium/src/olcs',
Expand Down
6 changes: 3 additions & 3 deletions contribs/gmf/src/objectediting/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import olStyleFill from 'ol/style/Fill.js';
import olStyleStroke from 'ol/style/Stroke.js';
import olStyleStyle from 'ol/style/Style.js';

import {OL3Parser} from 'jsts/io';
import jsts from 'jsts';


/**
Expand Down Expand Up @@ -315,7 +315,7 @@ exports.Controller = function($scope, $timeout, gettextCatalog,
* @type {!jsts.io.OL3Parser}
* @private
*/
this.jstsOL3Parser_ = new OL3Parser(undefined, {
this.jstsOL3Parser_ = new jsts.io.OL3Parser(undefined, {
geom: {
Point, LineString, LinearRing, Polygon, MultiPoint, MultiLineString, MultiPolygon, GeometryCollection
}
Expand Down Expand Up @@ -803,7 +803,7 @@ exports.Controller.prototype.handleModifyInteractionModifyEnd_ = function(

if (geometry instanceof MultiPolygon) {
const jstsGeom = this.jstsOL3Parser_.read(geometry);
const jstsBuffered = jstsGeom.buffer(0);
const jstsBuffered = jstsGeom.get(0);
geometry = ngeoUtils.toMulti(this.jstsOL3Parser_.write(jstsBuffered));
this.skipGeometryChange_ = true;
this.feature.setGeometry(geometry.clone());
Expand Down

0 comments on commit c987eff

Please sign in to comment.