Coder Social home page Coder Social logo

huitimkit / jquery.areaselect.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gongshw/jquery.areaselect.js

0.0 2.0 0.0 197 KB

AreaSelect is a jQuery plugin that gives you the ability to Select multiple areas from an image.

Home Page: http://blog.gongshw.com/jquery.areaSelect.js/demo/demo.html

JavaScript 100.00%

jquery.areaselect.js's Introduction

jquery.areaSelect.js

AreaSelect is a jQuery plugin that gives you the ability to Select multiple areas from an image.

view demo: http://blog.gongshw.com/jquery.areaSelect.js/demo/demo.html

Init

var options = { // all the option fields are optional
	initAreas: [{"x": 280, "y": 93, "width": 50, "height": 50}], // the initial areas when the plugin load
	deleteMethod: 'click', //or 'doubleClick'
	area: {strokeStyle: 'red', lineWidth: 2}, // style to draw selected areas
	point: {size: 3, fillStyle: 'black'}, // style to draw point
};
$img.areaSelect(options);

Get Selected Areas

var selectAreas = $img.areaSelect('get');
// [{"x":280,"y":93,"width":50,"height":50}]

Event

$img.areaSelect('bindChangeEvent', function (event, data) {
	//invoke when selected areas changed
	alert(data.areas);
});

Uninstall

$img.areaSelect('uninstall');

jquery.areaselect.js's People

Contributors

gongshw avatar

Watchers

James Cloos avatar 搬运工 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.