
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
@yandex/ymaps3-resizer
Advanced tools
Yandex JS API package
The package is located in the dist
folder:
dist/types
TypeScript typesdist/esm
es6 modules for direct connection in your projectdist/index.js
Yandex JS ModuleRecommended use ymaps3-resizer
as usual npm package:
npm install @yandex/ymaps3-resizer
You also need to import css styles into your project:
/* index.css */
@import '@yandex/ymaps3-resizer/dist/esm/index.css';
and dynamic import
main();
async function main() {
await ymaps3.ready;
const {YMap, YMapDefaultSchemeLayer, YMapDefaultFeaturesLayer} = ymaps3;
const {YMapResizer} = await import('@yandex/ymaps3-resizer');
map = new YMap(document.getElementById('app'), {location: LOCATION});
map.addChild(new YMapDefaultSchemeLayer({}));
map.addChild(new YMapDefaultFeaturesLayer({}));
map.addChild(new YMapResizer({minWidth: 400, maxWidth: 1000, minHeight: 400, maxHeight: 600}));
}
Property | Type | Default | Description |
---|---|---|---|
direction | 'both' | 'horizontal' | 'vertical' | 'both' | Resize direction. |
minWidth | number | - | Resize minimum width limit in 'px'. |
maxWidth | number | - | Resize maximum width limit in 'px'. |
minHeight | number | - | Resize minimum height limit in 'px'. |
maxHeight | number | - | Resize maximum height limit in 'px'. |
showOnlyOnHover | boolean | false | Shows resize controls only on hover. |
You can use CDN with module loading handler in JS API on your page.
By default ymaps3.import
can load self modules.
If you want also load your package, should register cdn:
ymaps3.import.registerCdn('https://cdn.jsdelivr.net/npm/{package}', '@yandex/ymaps3-resizer@latest');
Just use ymaps3.import
:
const {YMapResizer} = await ymaps3.import('@yandex/ymaps3-resizer');
FAQs
Yandex Maps JS API 3.0 example ymaps3-resizer
The npm package @yandex/ymaps3-resizer receives a total of 2,275 weekly downloads. As such, @yandex/ymaps3-resizer popularity was classified as popular.
We found that @yandex/ymaps3-resizer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.