Skip to content
Object-oriented / Component-based JavaScript UI framework over HTML5 Canvas
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist/wings-js
src
.gitignore
Gruntfile.js
LICENSE
README.md
package.json

README.md

Alt text

Usage:

Link Wings to your web page:

<script type='text/javascript' src='wings-[current version].min.js'></script>

You need a canvas to draw on:

<canvas id='canvas' width='300px' height='300px'>

Link that canvas to the view:

var view = new Wings.View(document.getElementById('canvas'));

Create a component:

var Box = Wings.Panel.extend({
			init : function Box() {
				this._super();
				this.size(50, 50);
				this.backgroundColor('magenta');
				this.borderColor('cyan');
				this.borderWidth(5);
			}
		});

Add it to the view:

var box = new Box();
view.add(box);

Locate it inside:

box.location(100, 100);

Add mouse reaction to it:

box.add(new Wings.MouseDown(function() {
	alert('My location is ' + box.location());
}));

See demos at http://1nside0ut.com/wings-js/

You can’t perform that action at this time.