Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix non default imports #4579

Merged
merged 1 commit into from
Feb 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions contribs/gmf/examples/objecteditinghub.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import gmfEditingXSDAttributes from 'gmf/editing/XSDAttributes.js';
import gmfObjecteditingManager, {ObjecteditingParam} from 'gmf/objectediting/Manager.js';
import gmfThemeThemes from 'gmf/theme/Themes.js';
import olFormatWFS from 'ol/format/WFS.js';
import ngeoFormatXSDAttribute from 'ngeo/format/XSDAttribute.js';
import {getGeometryAttribute} from 'ngeo/format/XSDAttribute.js';


/** @type {!angular.IModule} **/
Expand Down Expand Up @@ -404,7 +404,7 @@ MainController.prototype.issueGetAttributesRequest_ = function(
this.gmfXSDAttributes_.getAttributes(gmfLayerNode.id).then(
function(gmfLayerNode, attributes) {
// Get geom type from attributes and set
const geomAttr = ngeoFormatXSDAttribute.getGeometryAttribute(attributes);
const geomAttr = getGeometryAttribute(attributes);
if (geomAttr && geomAttr.geomType) {
this.geomTypeCache_[gmfLayerNode.id] = geomAttr.geomType;
this.getGeometryTypeDeferred_.resolve();
Expand Down
6 changes: 2 additions & 4 deletions contribs/gmf/examples/xsdattributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import gmfThemeThemes from 'gmf/theme/Themes.js';

import gmfEditingXSDAttributes from 'gmf/editing/XSDAttributes.js';
import ngeoEditingAttributesComponent from 'ngeo/editing/attributesComponent.js';
import ngeoFormatXSDAttribute from 'ngeo/format/XSDAttribute.js';
import {getGeometryAttribute} from 'ngeo/format/XSDAttribute.js';
import olFeature from 'ol/Feature.js';
import 'jquery-datetimepicker/jquery.datetimepicker.css';

Expand Down Expand Up @@ -130,9 +130,7 @@ MainController.prototype.setAttributes_ = function(attributes) {
MainController.prototype.getGeomType = function() {
let type = 'N/A';
if (this.attributes) {
const geomAttr = ngeoFormatXSDAttribute.getGeometryAttribute(
this.attributes
);
const geomAttr = getGeometryAttribute(this.attributes);
if (geomAttr && geomAttr.geomType) {
type = geomAttr.geomType;
}
Expand Down
4 changes: 2 additions & 2 deletions contribs/gmf/src/editing/Snapping.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import angular from 'angular';
import gmfLayertreeTreeManager from 'gmf/layertree/TreeManager.js';
import gmfThemeThemes, {ThemeNodeType, getSnappingConfig} from 'gmf/theme/Themes.js';
import ngeoLayertreeController from 'ngeo/layertree/Controller.js';
import ngeoLayertreeController, {getFirstParentTree} from 'ngeo/layertree/Controller.js';
import {getUid as olUtilGetUid} from 'ol/util.js';
import * as olEvents from 'ol/events.js';
import olCollection from 'ol/Collection.js';
Expand Down Expand Up @@ -283,7 +283,7 @@ EditingSnappingService.prototype.getOGCServer_ = function(treeCtrl) {
if (gmfGroup.mixed) {
ogcServerName = gmfLayerWMS.ogcServer;
} else {
const firstTreeCtrl = ngeoLayertreeController.getFirstParentTree(treeCtrl);
const firstTreeCtrl = getFirstParentTree(treeCtrl);
const firstNode = /** @type {import('gmf/themes.js').GmfGroup} */ (firstTreeCtrl.node);
ogcServerName = firstNode.ogcServer;
}
Expand Down
10 changes: 4 additions & 6 deletions contribs/gmf/src/editing/editFeatureComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import gmfEditingEditFeature from 'gmf/editing/EditFeature.js';
import gmfEditingSnapping from 'gmf/editing/Snapping.js';

import gmfEditingXSDAttributes from 'gmf/editing/XSDAttributes.js';
import gmfLayertreeSyncLayertreeMap from 'gmf/layertree/SyncLayertreeMap.js';
import {getLayer as syncLayertreeMapGetLayer} from 'gmf/layertree/SyncLayertreeMap.js';
import DateFormatter from 'ngeo/misc/php-date-formatter.js';
import 'jquery-datetimepicker/jquery.datetimepicker.js';
import 'jquery-datetimepicker/jquery.datetimepicker.css';
Expand All @@ -15,7 +15,7 @@ import ngeoEditingAttributesComponent from 'ngeo/editing/attributesComponent.js'
import ngeoEditingCreatefeatureComponent from 'ngeo/editing/createfeatureComponent.js';

import {deleteCondition} from 'ngeo/utils.js';
import ngeoFormatXSDAttribute from 'ngeo/format/XSDAttribute.js';
import {getGeometryAttribute} from 'ngeo/format/XSDAttribute.js';
import ngeoGeometryType from 'ngeo/GeometryType.js';
import ngeoInteractionRotate from 'ngeo/interaction/Rotate.js';
import ngeoInteractionTranslate from 'ngeo/interaction/Translate.js';
Expand Down Expand Up @@ -531,7 +531,7 @@ Controller.prototype.$onInit = function() {
this.tolerance = this.tolerance !== undefined ? this.tolerance : 10;

// (1.1) Set editable WMS layer
const layer = gmfLayertreeSyncLayertreeMap.getLayer(this.editableTreeCtrl);
const layer = syncLayertreeMapGetLayer(this.editableTreeCtrl);
console.assert(
layer instanceof olLayerImage || layer instanceof olLayerTile);
this.editableWMSLayer_ = layer;
Expand Down Expand Up @@ -860,9 +860,7 @@ Controller.prototype.setAttributes_ = function(attributes) {
}

// Get geom type from attributes and set
const geomAttr = ngeoFormatXSDAttribute.getGeometryAttribute(
this.attributes
);
const geomAttr = getGeometryAttribute(this.attributes);
if (geomAttr && geomAttr.geomType) {
this.geomType = geomAttr.geomType;
}
Expand Down