Last active
December 19, 2015 04:18
-
-
Save lahmatiy/5895982 to your computer and use it in GitHub Desktop.
Path to restore forceEvent argument and boolean result for basis.data.Value#set (dropped in 0.9.4)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
basis.require('basis.data'); | |
(function(){ | |
var set_ = basis.data.Value.prototype.set; | |
basis.data.Value.prototype.set = function(value, forceEvent){ | |
var valueBeforeSet = this.value; | |
set_.call(this, value); | |
var changed = this.value !== valueBeforeSet; | |
if (forceEvent && !changed) | |
this.emit_change(this.value, this.value); | |
return changed; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment