diff --git a/source/js/VMM.Timeline.js b/source/js/VMM.Timeline.js index d65b651..e247409 100755 --- a/source/js/VMM.Timeline.js +++ b/source/js/VMM.Timeline.js @@ -103,6 +103,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { current_slide: 0, hash_bookmark: false, start_at_end: false, + start_at_slide: 0, start_page: false, api_keys: { google: "", @@ -125,10 +126,11 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { density: 4, minor_width: 0, minor_left: 0, - contstraint: { + constraint: { left: 0, right: 0, - right_min: 0 + right_min: 0, + right_max: 0 }, multiplier: { current: 6, @@ -178,18 +180,20 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { if(window.location.hash) { var hash = window.location.hash.substring(1); if (!isNaN(hash)) { - config.current_slide = parseInt(hash); + config.current_slide = parseInt(hash); } } window.onhashchange = function () { + var hash = window.location.hash.substring(1); if (config.hash_bookmark) { if (is_moving) { - var hash = window.location.hash.substring(1); goToEvent(parseInt(hash)); } else { is_moving = false; } + } else { + goToEvent(parseInt(hash)); } } @@ -356,17 +360,13 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { } } - if (ie7) { - ie7 = true; - VMM.fireEvent(global, config.events.messege, "Internet Explorer " + VMM.Browser.version + " is not supported by TimelineJS. Please update your browser to version 8 or higher."); + if (type.of(_data) == "string" || type.of(_data) == "object") { + VMM.Timeline.DataObj.getData(_data); } else { - if (type.of(_data) == "string" || type.of(_data) == "object") { - VMM.Timeline.DataObj.getData(_data); - } else { - VMM.Timeline.DataObj.getData(VMM.getElement(timeline_id)); - } + VMM.Timeline.DataObj.getData(VMM.getElement(timeline_id)); } + }; this.iframeLoaded = function() { @@ -414,24 +414,59 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { if (config.start_at_end && config.current_slide == 0) { config.current_slide = _dates.length - 1; } - // CREATE DOM STRUCTURE - VMM.attachElement($timeline, ""); - VMM.appendElement($timeline, "