🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

mapbox-gl-draw-modes-modify

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mapbox-gl-draw-modes-modify

这是一个mapbox-gl-draw绘图模式个性化修改器

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

mapbox-gl-draw-modes-modify

mapbox-gl-draw-modes-modify nodejs blog

这是一个mapbox-gl-draw的绘图模式个性化修改器。在原有模式上增添了许多方便实用的功能。

This is a mapbox-gl-draw drawing modes personalization modifier. Many convenient and practical functions have been added to the original model.

Run Simple Demo

$ git clone https://github.com/SuperYesifang/mapbox-gl-draw-modes-modify.git
$ cd mapbox-gl-draw-modes-modify
$ npm run serve

Usage

DrawModesModify(MapboxDraw.modes, options?)

1. Use CDN

<script src="https://raw.githubusercontent.com/SuperYesifang/mapbox-gl-draw-modes-modify/master/dist/DrawModesModify.cdn.js"></script>

2. Use ESM

import MapboxDraw from "@mapbox/mapbox-gl-draw";
import DrawModesModify from "mapbox-gl-draw-modes-modify";

const draw = new MapboxDraw({
    modes: DrawModesModify(MapboxDraw.modes, {
        editable: false
    })
});

map.addControl(draw);

Options

proptypedescription
editablebooleanWhether the drawing can be re-edited. default: true.
selectablebooleanWhether the drawing you have drawn can be selected. default: true.
draggablebooleanWhether the drawing can be dragged and moved. default: true.(valid when editable is ture)
adjustablebooleanWhether the drawn graph can reposition the vertex. defualt : true.(valid when editable is ture)
focusbooleanWhether to retain the focus of the graphic after the drawing is completed. default: true.

Keywords

mapbox-gl-draw

FAQs

Package last updated on 20 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts