Merge pull request #7880 from tschaub/named-exports

Named exports from ol/style/Style
This commit is contained in:
Tim Schaub
2018-02-23 09:04:03 -08:00
committed by GitHub
8 changed files with 35 additions and 34 deletions

View File

@@ -26,7 +26,7 @@ import PointerInteraction, {handleEvent as handlePointerEvent} from '../interact
import InteractionProperty from '../interaction/Property.js';
import VectorLayer from '../layer/Vector.js';
import VectorSource from '../source/Vector.js';
import Style from '../style/Style.js';
import {createEditingStyle} from '../style/Style.js';
/**
@@ -377,7 +377,7 @@ inherits(Draw, PointerInteraction);
* @return {ol.StyleFunction} Styles.
*/
function getDefaultStyleFunction() {
const styles = Style.createDefaultEditing();
const styles = createEditingStyle();
return function(feature, resolution) {
return styles[feature.getGeometry().getType()];
};

View File

@@ -15,7 +15,7 @@ import ExtentEventType from '../interaction/ExtentEventType.js';
import PointerInteraction, {handleEvent as handlePointerEvent} from '../interaction/Pointer.js';
import VectorLayer from '../layer/Vector.js';
import VectorSource from '../source/Vector.js';
import Style from '../style/Style.js';
import {createEditingStyle} from '../style/Style.js';
/**
@@ -263,7 +263,7 @@ function handleUpEvent(mapBrowserEvent) {
* @return {ol.StyleFunction} Default Extent style
*/
function getDefaultExtentStyleFunction() {
const style = Style.createDefaultEditing();
const style = createEditingStyle();
return function(feature, resolution) {
return style[GeometryType.POLYGON];
};
@@ -275,7 +275,7 @@ function getDefaultExtentStyleFunction() {
* @return {ol.StyleFunction} Default pointer style
*/
function getDefaultPointerStyleFunction() {
const style = Style.createDefaultEditing();
const style = createEditingStyle();
return function(feature, resolution) {
return style[GeometryType.POINT];
};

View File

@@ -22,7 +22,7 @@ import VectorLayer from '../layer/Vector.js';
import VectorSource from '../source/Vector.js';
import VectorEventType from '../source/VectorEventType.js';
import RBush from '../structs/RBush.js';
import Style from '../style/Style.js';
import {createEditingStyle} from '../style/Style.js';
/**
* @classdesc
@@ -1180,7 +1180,7 @@ Modify.prototype.updateSegmentIndices_ = function(
* @return {ol.StyleFunction} Styles.
*/
Modify.getDefaultStyleFunction = function() {
const style = Style.createDefaultEditing();
const style = createEditingStyle();
return function(feature, resolution) {
return style[GeometryType.POINT];
};

View File

@@ -13,7 +13,7 @@ import Interaction from '../interaction/Interaction.js';
import VectorLayer from '../layer/Vector.js';
import {clear} from '../obj.js';
import VectorSource from '../source/Vector.js';
import Style from '../style/Style.js';
import {createEditingStyle} from '../style/Style.js';
/**
@@ -334,7 +334,7 @@ Select.prototype.setMap = function(map) {
* @return {ol.StyleFunction} Styles.
*/
Select.getDefaultStyleFunction = function() {
const styles = Style.createDefaultEditing();
const styles = createEditingStyle();
extend(styles[GeometryType.POLYGON], styles[GeometryType.LINE_STRING]);
extend(styles[GeometryType.GEOMETRY_COLLECTION], styles[GeometryType.LINE_STRING]);