From 5baa49ebac68b856322d40b331031d0fc4a3e5b9 Mon Sep 17 00:00:00 2001 From: Ivar Vong Date: Tue, 3 Apr 2012 18:31:07 -0700 Subject: [PATCH] allow a JSON object be used on init() --- 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);