0

I'm working on TimelineJs3 and managed few small alterations to its features. However I dont want to hack main timelinejs3 files.

I've tried to override them with simply copying them but they wont on their own. If I copy huge chunks of the code and alter them, then they work but its counter productive

this is the code I'm trying to over ride

next: function() {
    var n = this._findSlideIndex(this.current_id);
    if ((n + 1) < (this._slides.length)) {
        this.goTo(n + 1);
    } else {
        this.goTo(n);
    }
},

previous: function() {
    var n = this._findSlideIndex(this.current_id);
    if (n - 1 >= 0) {
        this.goTo(n - 1);
    } else {
        this.goTo(n);
    }
},

They appear at line 10064 of https://github.com/NUKnightLab/TimelineJS3/blob/master/compiled/js/timeline.js

I had to copy from 9896 (starting with TL.StorySlider = TL.Class.extend) till 10337 for the above 20 lines to work.

I would appreciate any help on the matter.

  • Hosting your own copy and making the changes to it is one obvious solution. – spring Feb 28 '17 at 00:06
  • Well yea. Thats what I'm currently doing. But as I've mentioned. IF I can, I would rather not edit the core script itself. Also would like to learn why I cannot override these functions codes just like other functions. – user3067368 Feb 28 '17 at 11:02

0 Answers0