Got rid of ES7 notation and built library

This commit is contained in:
Kevin Malakoff 2015-09-30 01:59:41 -07:00 committed by Zeno Rocha
parent 8dc4e2e132
commit e5a6797c82
2 changed files with 20 additions and 5 deletions

23
dist/clipboard.js vendored
View File

@ -477,11 +477,21 @@ var Clipboard = (function (_Emitter) {
_classCallCheck(this, Clipboard);
_Emitter.call(this);
this.initialize = this.initialize.bind(this); // pre-bind for consistent reference on remove
this.resolveOptions(options);
this.delegateClick(selector);
}
/**
* @param {String} selector
* @param {Object} options
*/
Clipboard.prototype.destroy = function destroy() {
this.undelegateClick();
};
/**
* Defines if attributes would be resolved using internal setter functions
* or custom functions that were passed in the constructor.
@ -502,11 +512,16 @@ var Clipboard = (function (_Emitter) {
*/
Clipboard.prototype.delegateClick = function delegateClick(selector) {
var _this = this;
_delegateEvents2['default'].bind(document.body, selector, 'click', this.initialize);
};
_delegateEvents2['default'].bind(document.body, selector, 'click', function (e) {
return _this.initialize(e);
});
/**
* Undelegates a click event on the passed selector.
* @param {String} selector
*/
Clipboard.prototype.undelegateClick = function undelegateClick() {
_delegateEvents2['default'].unbind(document.body, 'click', this.initialize);
};
/**

File diff suppressed because one or more lines are too long