Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/util
In directory usw-pr-cvs1:/tmp/cvs-serv22686/src/lib/dynapi/util

Modified Files:
        pathanim.js thread.js 
Log Message:
The initiall onresize ( on layer creation ) was being called before onCreate, and with 
.created = false. I've fixed that. Things are working better now.

Index: pathanim.js
===================================================================
RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/util/pathanim.js,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** pathanim.js 2001/02/09 15:41:07     1.10
--- pathanim.js 2001/03/27 15:34:27     1.11
***************
*** 30,35 ****
        this.paths[n].loops = (loops);
  };
! PathAnimation.prototype.setResets = function (n, resets) 
!       {this.paths[n].resets = (resets);
  };
  PathAnimation.prototype.setFrame = function (n, frame) {
--- 30,35 ----
        this.paths[n].loops = (loops);
  };
! PathAnimation.prototype.setResets = function (n, resets) {
!       this.paths[n].resets = (resets);
  };
  PathAnimation.prototype.setFrame = function (n, frame) {

Index: thread.js
===================================================================
RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/util/thread.js,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** thread.js   2000/12/07 21:31:19     1.3
--- thread.js   2001/03/27 15:34:27     1.4
***************
*** 8,17 ****
        dynapi.api [dynlayer, dyndocument, browser, events]
  */
- 
- 
  function Thread(dlyr) {
        this.setDynLayer(dlyr);
-       Thread.setUniqueKey(this);
  }
  Thread.prototype.active = false;
  Thread.prototype.interval = 50;
--- 8,19 ----
        dynapi.api [dynlayer, dyndocument, browser, events]
  */
  function Thread(dlyr) {
+       // Inherit from object. Provides unique ID
+       this.DynObject = DynObject
+       this.DynObject()
+       
        this.setDynLayer(dlyr);
  }
+ Thread.prototype = new DynObject
  Thread.prototype.active = false;
  Thread.prototype.interval = 50;
***************
*** 21,25 ****
        if (this.active) {
                this.stop();
!               setTimeout(this._key+'.start()',this.interval+1);
        }
  };
--- 23,27 ----
        if (this.active) {
                this.stop();
!               setTimeout(this+'.start()',this.interval+1);
        }
  };
***************
*** 34,38 ****
        if (!this.active) {
                this.active = true;
!               if (!this.cancelThread) this.timer = 
setInterval(this._key+'.run()',this.interval);
        }
  };
--- 36,40 ----
        if (!this.active) {
                this.active = true;
!               if (!this.cancelThread) this.timer = 
setInterval(this+'.run()',this.interval);
        }
  };
***************
*** 50,71 ****
  Thread.prototype.getDynLayer = function () {
        return this.dlyr;
- };
- 
- // Functions
- 
- // makes a unique ._key global reference to the object
- // I recommend this becomes DynAPI.setUniqueKey so that any object can use the same 
system
- // DynLayer.toString() cannot be used because it relies on layer ID's which arent 
determined
- // until after insertion - ie. you cannot get a reference to a DynLayer until you've 
added it
- Thread.setUniqueKey = function(obj) {
-       if (!DynAPI.uniqueKey) DynAPI.uniqueKey=0;
-       var key = "key_"+DynAPI.uniqueKey++;
-       if (typeof(obj)=="object") {
-               obj._key = key;
-               window[key] = obj;
-       }
-       return key;
- };
- Thread.getUniqueKey = function(obj) {
-       return obj._key;
  };
--- 52,54 ----


_______________________________________________
Dynapi-CVS mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-cvs

Reply via email to