samizdatco / arbor

a graph visualization library using web workers and jQuery
http://arborjs.org
2.66k stars 634 forks source link

Replacing __defineGetter__ and __defineSetter__ with Object.defineProperty get and set #59

Closed joedborg closed 3 years ago

joedborg commented 10 years ago

Methods defineGetter and defineSetter are deprecated (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineGetter). This is also what's stopping Arbor from displaying on IE9 (although there is still not complete functionality).

I have replaced the deprecated methods with Object.defineProperty for: Node.prototype.p (and all contained within) Node.prototype.fixed Node.prototype.tempMass Node.prototype.mass

This has been tested with the Atlas demo on Firefox 27.0.1, Chrome 24.0.1312.56 and IE9.