1.0.0 • Published 7 years ago

jsyg-selection v1.0.0

Weekly downloads
47
License
MIT
Repository
github
Last release
7 years ago

JSYG.Selection

Mouse selection plugin for JSYG framework

Demo

http://yannickbochatay.github.io/JSYG.Selection

Installation

npm install jsyg-selection

Usage

es6 modules (webpack+babel)
import Selection from "jsyg-selection"

let selectArea = new Selection("#myContainer");
selectArea.enable({
    list : ".selectable",
    onselectedlist : function(e,liste) {
        console.log(liste.length+" elements selected");
    }
});
browserify
var Selection = require("jsyg-selection");
var selectArea = new Selection("#myContainer");
selectArea.enable({
    list : ".selectable",
    onselectedlist : function(e,liste) {
        console.log(liste.length+" elements selected");
    }
});
without bundler
<script src="node_modules/jquery/dist/jquery.js"></script>
<script src="node_modules/jquery.hotkeys/jquery.hotkeys.js"></script>
<script src="node_modules/jsyg/dist/JSYG.js"></script>
<script src="node_modules/jsyg-resizable/JSYG.Resizable.js"></script>
<script src="node_modules/jsyg-selection/JSYG.Selection.js"></script>
<script>
var selectArea = new JSYG.Selection("#myContainer");
selectArea.enable({
    list : ".selectable",
    onselectedlist : function(e,liste) {
        console.log(liste.length+" elements selected");
    }
});
</script>

Warning

See the warning in JSYG config.