Skip to content

Commit

Permalink
Merge branch 'master' into GMC-0.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Lanny McNie committed Nov 26, 2015
2 parents 214d85f + d6c1329 commit d2c3f22
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 19 deletions.
4 changes: 4 additions & 0 deletions VERSIONS.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Version NEXT [not yet released]
****************************************************************************************************
- fixed MotionGuidePlugin handling of empty data
- solved memory leak in SparkTable demo
- bug fixes
- documentation updates


Version 0.6.1 [May 21, 2015]
Expand Down
Binary file modified docs/TweenJS_docs-NEXT.zip
Binary file not shown.
54 changes: 36 additions & 18 deletions lib/tweenjs-NEXT.combined.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ this.createjs = this.createjs||{};
*
* function MySubClass() {}
* createjs.extend(MySubClass, MySuperClass);
* ClassB.prototype.doSomething = function() { }
* MySubClass.prototype.doSomething = function() { }
*
* var foo = new MySubClass();
* console.log(foo instanceof MySuperClass); // true
Expand Down Expand Up @@ -271,12 +271,12 @@ this.createjs = this.createjs||{};
* @deprecated
*/
// p.initialize = function() {}; // searchable for devs wondering where it is.


// public methods:
/**
* Sets {{#crossLink "Event/defaultPrevented"}}{{/crossLink}} to true.
* Mirrors the DOM event standard.
* Sets {{#crossLink "Event/defaultPrevented"}}{{/crossLink}} to true if the event is cancelable.
* Mirrors the DOM level 2 event standard. In general, cancelable events that have `preventDefault()` called will
* cancel the default behaviour associated with the event.
* @method preventDefault
**/
p.preventDefault = function() {
Expand Down Expand Up @@ -404,7 +404,12 @@ this.createjs = this.createjs||{};
* console.log(instance == this); // true, "on" uses dispatcher scope by default.
* });
*
* If you want to use addEventListener instead, you may want to use function.bind() or a similar proxy to manage scope.
* If you want to use addEventListener instead, you may want to use function.bind() or a similar proxy to manage
* scope.
*
* <b>Browser support</b>
* The event model in CreateJS can be used separately from the suite in any project, however the inheritance model
* requires modern browsers (IE9+).
*
*
* @class EventDispatcher
Expand Down Expand Up @@ -507,7 +512,11 @@ this.createjs = this.createjs||{};
* only run once, associate arbitrary data with the listener, and remove the listener.
*
* This method works by creating an anonymous wrapper function and subscribing it with addEventListener.
* The created anonymous function is returned for use with .removeEventListener (or .off).
* The wrapper function is returned for use with `removeEventListener` (or `off`).
*
* <b>IMPORTANT:</b> To remove a listener added with `on`, you must pass in the returned wrapper function as the listener, or use
* {{#crossLink "Event/remove"}}{{/crossLink}}. Likewise, each time you call `on` a NEW wrapper function is subscribed, so multiple calls
* to `on` with the same params will create multiple listeners.
*
* <h4>Example</h4>
*
Expand Down Expand Up @@ -577,6 +586,9 @@ this.createjs = this.createjs||{};
/**
* A shortcut to the removeEventListener method, with the same parameters and return value. This is a companion to the
* .on method.
*
* <b>IMPORTANT:</b> To remove a listener added with `on`, you must pass in the returned wrapper function as the listener. See
* {{#crossLink "EventDispatcher/on"}}{{/crossLink}} for an example.
*
* @method off
* @param {String} type The string type of the event.
Expand Down Expand Up @@ -622,19 +634,24 @@ this.createjs = this.createjs||{};
* @method dispatchEvent
* @param {Object | String | Event} eventObj An object with a "type" property, or a string type.
* While a generic object will work, it is recommended to use a CreateJS Event instance. If a string is used,
* dispatchEvent will construct an Event instance with the specified type.
* @return {Boolean} Returns the value of eventObj.defaultPrevented.
* dispatchEvent will construct an Event instance if necessary with the specified type. This latter approach can
* be used to avoid event object instantiation for non-bubbling events that may not have any listeners.
* @param {Boolean} [bubbles] Specifies the `bubbles` value when a string was passed to eventObj.
* @param {Boolean} [cancelable] Specifies the `cancelable` value when a string was passed to eventObj.
* @return {Boolean} Returns false if `preventDefault()` was called on a cancelable event, true otherwise.
**/
p.dispatchEvent = function(eventObj) {
p.dispatchEvent = function(eventObj, bubbles, cancelable) {
if (typeof eventObj == "string") {
// won't bubble, so skip everything if there's no listeners:
// skip everything if there's no listeners and it doesn't bubble:
var listeners = this._listeners;
if (!listeners || !listeners[eventObj]) { return false; }
eventObj = new createjs.Event(eventObj);
if (!bubbles && (!listeners || !listeners[eventObj])) { return true; }
eventObj = new createjs.Event(eventObj, bubbles, cancelable);
} else if (eventObj.target && eventObj.clone) {
// redispatching an active event object, so clone it:
eventObj = eventObj.clone();
}

// TODO: it would be nice to eliminate this. Maybe in favour of evtObj instanceof Event? Or !!evtObj.createEvent
try { eventObj.target = this; } catch (e) {} // try/catch allows redispatching of native events

if (!eventObj.bubbles || !this.parent) {
Expand All @@ -653,7 +670,7 @@ this.createjs = this.createjs||{};
list[i]._dispatchEvent(eventObj, 3);
}
}
return eventObj.defaultPrevented;
return !eventObj.defaultPrevented;
};

/**
Expand Down Expand Up @@ -1031,7 +1048,7 @@ this.createjs = this.createjs||{};
};

/**
* Use the {{#crossLink "Ticker/framerate:property"}}{{/crossLink}} property instead.
* Use the {{#crossLink "Ticker/interval:property"}}{{/crossLink}} property instead.
* @method getInterval
* @static
* @return {Number}
Expand All @@ -1053,7 +1070,7 @@ this.createjs = this.createjs||{};
};

/**
* Use the {{#crossLink "Ticker/interval:property"}}{{/crossLink}} property instead.
* Use the {{#crossLink "Ticker/framerate:property"}}{{/crossLink}} property instead.
* @method getFPS
* @static
* @return {Number}
Expand Down Expand Up @@ -1205,7 +1222,8 @@ this.createjs = this.createjs||{};
};

/**
* Similar to getTime(), but returns the time on the most recent tick event object.
* Similar to the {{#crossLink "Ticker/getTime"}}{{/crossLink}} method, but returns the time on the most recent {{#crossLink "Ticker/tick:event"}}{{/crossLink}}
* event object.
* @method getEventTime
* @static
* @param runTime {Boolean} [runTime=false] If true, the runTime property will be returned instead of time.
Expand Down Expand Up @@ -3324,7 +3342,7 @@ this.createjs = this.createjs||{};
* @static
*/
MotionGuidePlugin.calc = function(data, ratio, target) {
if(data._segments == undefined){ MotionGuidePlugin.validate(data); }
if(data._segments == undefined){ throw("Missing critical pre-calculated information, please file a bug"); }
if(target == undefined){ target = {x:0, y:0, rotation:0}; }
var seg = data._segments;
var path = data.path;
Expand Down Expand Up @@ -3398,6 +3416,6 @@ this.createjs = this.createjs || {};
* @type String
* @static
**/
s.buildDate = /*=date*/"Wed, 27 May 2015 18:12:44 GMT"; // injected by build process
s.buildDate = /*=date*/"Wed, 25 Nov 2015 19:32:49 GMT"; // injected by build process

})();
Loading

0 comments on commit d2c3f22

Please sign in to comment.