Skip to content

Commit

Permalink
Export library methods for external custom modes
Browse files Browse the repository at this point in the history
  • Loading branch information
trygveaa committed Mar 20, 2020
1 parent 44f7937 commit d0b50fe
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ import runSetup from './src/setup';
import setupOptions from './src/options';
import setupAPI from './src/api';
import * as Constants from './src/constants';
import * as CommonSelectors from './src/lib/common_selectors';
import constrainFeatureMovement from './src/lib/constrain_feature_movement';
import createSupplementaryPoints from './src/lib/create_supplementary_points';
import createVertex from './src/lib/create_vertex';
import doubleClickZoom from './src/lib/double_click_zoom';
import featuresAt from './src/lib/features_at';
import isEventAtCoordinates from './src/lib/is_event_at_coordinates';
import mouseEventPoint from './src/lib/mouse_event_point';
import moveFeatures from './src/lib/move_features';
import StringSet from './src/lib/string_set';

const setupDraw = function(options, api) {
options = setupOptions(options);
Expand Down Expand Up @@ -30,4 +40,18 @@ function MapboxDraw(options) {
import modes from './src/modes/index';
MapboxDraw.modes = modes;

export {
Constants,
CommonSelectors,
constrainFeatureMovement,
createSupplementaryPoints,
createVertex,
doubleClickZoom,
featuresAt,
isEventAtCoordinates,
mouseEventPoint,
moveFeatures,
StringSet
};

export default MapboxDraw;

0 comments on commit d0b50fe

Please sign in to comment.