Skip to content

Commit

Permalink
Merge pull request #1 from GenesysPureConnect/add-unregister
Browse files Browse the repository at this point in the history
Adding method to unregister global events
  • Loading branch information
stormojm authored Jul 13, 2019
2 parents 4649d72 + 8249026 commit df5a49d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
11 changes: 9 additions & 2 deletions dist/bigtext.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! BigText - v1.0.1 - 2017-10-02
/*! BigText - v1.0.1 - 2019-07-13
* https://github.com/zachleat/bigtext
* Copyright (c) 2017 Zach Leatherman (@zachleat)
* Copyright (c) 2019 Zach Leatherman (@zachleat)
* MIT License */

(function(window, $) {
Expand Down Expand Up @@ -132,6 +132,13 @@

return this.trigger('bigtext:complete');
},
unregister: function(id)
{
if(id) {
// Unregister the BigText resize event that was bound to the window.
$(window).unbind('resize.bigtext-event-' + id);
}
},
testLineDimensions: function($line, maxWidth, property, size, interval, units, previousWidth)
{
var width;
Expand Down
7 changes: 7 additions & 0 deletions src/bigtext.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@

return this.trigger('bigtext:complete');
},
unregister: function(id)
{
if(id) {
// Unregister the BigText resize event that was bound to the window.
$(window).unbind('resize.bigtext-event-' + id);
}
},
testLineDimensions: function($line, maxWidth, property, size, interval, units, previousWidth)
{
var width;
Expand Down

0 comments on commit df5a49d

Please sign in to comment.