From b1864421506936642ee508359bc7bcf581cc6909 Mon Sep 17 00:00:00 2001 From: Ivar Vong Date: Wed, 4 Apr 2012 15:30:14 -0700 Subject: [PATCH] allow init() to be called with a json object --- timeline.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/timeline.js b/timeline.js index ac8ee3d..1581f40 100644 --- a/timeline.js +++ b/timeline.js @@ -3686,6 +3686,8 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { } else { if (type.of(d) == "string") { VMM.Timeline.DataObj.getData(d); + } else if (type.of(d) == 'object' && d.timeline.type == "default") { // we got a JSON object passed in, let's go! + VMM.fireEvent(global, "DATAREADY", d); } else { VMM.Timeline.DataObj.getData(html_string); //VMM.attachElement(element, content);