
Security News
/Research
Coordinated npm and PyPI Campaign Typosquats Popular Secure Payment Apps
Socket uncovered 17 malicious npm and PyPI packages typosquatting Paysafe, Skrill, and Neteller SDKs to steal developer secrets.
@maptalks/transform-control
Advanced tools
transform-control a plugin to control model's translate、rotation and scale.
npm install @maptalks/transform-control.https://unpkg.com/@maptalks/transform-control/dist/transform-control.js<script type="text/javascript" src="../maptalks.transform-control.js"></script>
<script>
var map = new maptalks.Map("map",{
center : [0, 0],
zoom : 15
});
var transformControl = new maptalks.TransformControl();
transformControl.addTo(map);
transformControl.on('transforming', e => {
//get translate、rotation、scale
const translate = e.translate;
const rotation = e.rotation;
const scale = e.scale;
});
</script>
import TransfromControl from '@maptalks/transform-control';
const map = new maptalks.Map("map",{
center : [0, 0],
zoom : 15
});
const transformControl = new maptalks.TransformControl();
transformControl.addTo(map);
transformControl.on('transforming', e => {
//get translate、rotation、scale
const translate = e.translate;
const rotation = e.rotation;
const scale = e.scale;
});
(inherited from maptalks.Eventable)transform control's constructor.
| Parameter | Type | Default | Description |
|---|---|---|---|
id | String | transform control's id | |
options | Object | null | construct options |
add the control to a map
| Parameter | Type | Default | Description |
|---|---|---|---|
map | maptalks.Map | a map to add |
returns :
TransformControl: this
remove the control from map
specify a target to transform
| Parameter | Type | Default | Description |
|---|---|---|---|
target | GLTFMarker | Mesh | null | the target to transform |
get the current tranforming target
returns :
Object: the transforming target object
enable the control
returns :
TransformControl: return this
disable the control, when disable the control, it will be not available TransformControl: return this
whether the control is enable Boolean: true or false
FAQs
a plugin to control model's translate、rotation and scale
The npm package @maptalks/transform-control receives a total of 1,904 weekly downloads. As such, @maptalks/transform-control popularity was classified as popular.
We found that @maptalks/transform-control demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
/Research
Socket uncovered 17 malicious npm and PyPI packages typosquatting Paysafe, Skrill, and Neteller SDKs to steal developer secrets.

Security News
Node.js is debating whether AI-driven security report volume warrants moving more vulnerability reports into public workflows.

Security News
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.