mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 08:38:00 +00:00
private _writable
method
inverse of readOnly
This commit is contained in:
parent
c0de630442
commit
4be776955d
1 changed files with 12 additions and 1 deletions
|
@ -505,7 +505,7 @@ define(function(){
|
||||||
/**
|
/**
|
||||||
* Make the property not writable. Internal use only.
|
* Make the property not writable. Internal use only.
|
||||||
* @private
|
* @private
|
||||||
* @param {string} property the property to make not writeable
|
* @param {string} property the property to make not writable
|
||||||
*/
|
*/
|
||||||
Tone.prototype._readOnly = function(property){
|
Tone.prototype._readOnly = function(property){
|
||||||
Object.defineProperty(this, property, {
|
Object.defineProperty(this, property, {
|
||||||
|
@ -514,6 +514,17 @@ define(function(){
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make an attribute writeable. Interal use only.
|
||||||
|
* @private
|
||||||
|
* @param {string} property the property to make writable
|
||||||
|
*/
|
||||||
|
Tone.prototype._writable = function(property){
|
||||||
|
Object.defineProperty(this, property, {
|
||||||
|
writable: true,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// GAIN CONVERSIONS
|
// GAIN CONVERSIONS
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Reference in a new issue