The helper is a library where a specific function can do in plug and play.
It is convenient to want to notify objects of what loans the change in the state when a specific event is generated on the application.
For instance, it is assumed that there is a library like the slide show.
In that case, I think that I might support the Swipe input with a keyboard and a mobile terminal.
The helper can freely build in the miscellaneous function, comes, and can do a switch effective/invalid.
In the following example, the following has been achieved by using the helper.
var Slideshow = new Class({
Implements: [Helper],
prev: function(){
//Processing that switches the image here enters.
},
next: function(){
//Processing that switches the image here enters.
}
});
var controller = new Slideshow();
controller.addHelper(
new Helper.Keyboard({
methods: {
p: 'prev',
n: 'next'
}
})
)
.addHelper(
new Helper.Swipe({
methods: {
left: 'next',
right: 'prev'
}
})
);
It is the necessary always one.
packager build Core/Class.Extras Core/DOMReady -blocks 1.2compat
Only when Helper.Swipe is used, it is necessary.
packager build Mobile/Swipe -packages Core > mootools-mobile.js
Please build in the necessary if necessary one.
packager build Helper/* +use-only Helper > helper.js
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.
blog comments powered by Disqus