Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svg.select.js

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svg.select.js

An extension of svg.js which allows to select elements with mouse

  • 2.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.7M
increased by3.19%
Maintainers
1
Weekly downloads
 
Created

What is svg.select.js?

The svg.select.js npm package is a plugin for the SVG.js library that allows for easy selection and manipulation of SVG elements. It provides functionalities for selecting, resizing, and dragging SVG elements, making it useful for creating interactive graphics and diagrams.

What are svg.select.js's main functionalities?

Selection

This feature allows you to make SVG elements selectable. The code sample demonstrates how to create a rectangle and make it selectable using the `selectize` method.

const draw = SVG().addTo('body').size(300, 300);
const rect = draw.rect(100, 100).attr({ fill: '#f06' });
rect.selectize();

Resizing

This feature enables resizing of SVG elements. The code sample shows how to create a rectangle, make it selectable, and then enable resizing using the `resize` method.

const draw = SVG().addTo('body').size(300, 300);
const rect = draw.rect(100, 100).attr({ fill: '#f06' });
rect.selectize().resize();

Dragging

This feature allows for dragging of SVG elements. The code sample demonstrates how to create a rectangle, make it selectable, and then enable dragging using the `draggable` method.

const draw = SVG().addTo('body').size(300, 300);
const rect = draw.rect(100, 100).attr({ fill: '#f06' });
rect.selectize().draggable();

Other packages similar to svg.select.js

Keywords

FAQs

Package last updated on 16 Mar 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc