Commit 38a3b44
authored
v2.0.5.1 - Various bug fixes, changes, new additions and deprecations (#11)
* Update changelog.md
* Deleted unnecessary development console log.
Deleted unnecessary development console log in the goTo method.
* Added a removed note on a new version
* Fixed a bug with preventDefault with the pause button
- Fixed a bug that when triggering a fake click on the autoplay pause button, it would spit out the error ** Cannot read property 'preventDefault' of undefined** I believe this was due to the fact the `event` wasn't passed to the `.on` function, therefore the plugin didn't understand the code.
Fixed by adding the `event` in to the functions (Line 619 and 636)
- The `.on` function relating to that of the timeline navigation was inadvertently being run when the pause/play buttons were clicked or triggered. Fixed by adding a `:not` CSS selector to exclude the buttons. (Line 619)
- The pause/play `.on` function (`changeButtons`) would now refresh the page, so fixed by adding `event.preventDefault();` (Line 816)
* Added some new bug fixtures relating to the pause button preventDefault bug
* Added a known issues that won't be fixed section and added the current version
* Update To Do.md
* Create Version
* Rename To Do.md to To_Do.md
* Added Version number
* Update horizontal_timeline.2.0.min.css
* Added deprecated items
* Update README.md
* Deprecated options, added object options and changed code to reflect this
- Deprecated several singular options. [Lines 37-44 and 75-95]
- Introduced new object options instead of the single options. [Lines 46-59 and 98-125]
- Combined the `animationClass` object into one nested object.
- Changed the jQuery options `$.extend` to deep nested recursion with the `true` boolean. Enables the possibility of deep nested objects in the options. [Line 138]
- Added a way to internally access the user options. [Line 141]
- Changed various code to check if the new object options is set in the user options, if so use them, otherwise use the deprecated single options. [Lines 183-189, 285-307, 902-909, 1578-1582, 1629-1633 and 1758-1770]
* changed indentation
* Update horizontal_timeline.2.0.js
* Update changelog.md
* added a known issue
* Added new changed, fixed and added notes
* Changes, Bug fixes and new DOM event.
- Changed the internal function structure to a prototype object of functions, so it only adds the functions to the prototype once.
- Changed the anonymous functions of `init.addIdsAndClasses`, `create.date`, `create.eventDateDisplay`, and `autoplay`; and added them to the timeline prototype as separate functions `_addIdsAndClasses`, `_createDate`, `_eventDateDisplay`, `_autoplay`.
- Fixed an issue with the autoplay pause and play functions, that wouldn't get the instance correctly.
- Changed the `create` function to put together the HTML in a variable before adding to the document, avoiding the obsessive use of the jQuery `.append()`.
- Fixed a bug where the new autoplay prototype function would throw an error when the autoplay `isPaused` and `mouseEvent` data is being set to the element data object because the data object wasn't created at that point (throwing an `undefined` error). Solved by adding it in the plugin wrapper instead of the internal function.
- Fixed a bug with the goTo timeline links where if any of the data options were omitted from the links, the function didn't utilise the default options. This was caused by inconsistent naming and the name changes that occured wasn't reflected in the variable declarations, thereby throwing an `unrecognised` error.
- Added a new DOM event `initialised` to combat the issue of undefined errors when trying to use the any of the public methods straight after the initialisation code. The errors are caused by the `setTimeout` in the init function to delay the code so it gets the correct width, which in turn makes everything else delayed. The DOM event will be fired after this delay, indicating the plugin has truly completed.
* Added a comment for the new initialised DOM event
* Fixed bug
- Fixed a bug where on first load or hard-reload, the page would have 2 scrollbars due to both the `HTML` and `body` having the `overflow-x: hidden` CSS attribute. Fixed by removing the `HTML` from the CSS rule. [Line 15]
* Update horizontal_timeline.2.0.min.css
* Changed initialised DOM event data
Changed the name of the event data `element` to `timelineSelector` of the initialised DOM event, to make it more obvious what is is. Element could refer to any part of the timeline, where as timelineSelector would be more specific. [Line 242 - 246]
* Update changelog.md
* Update README.md
- Added an autoplay note
- Updated the options
* Update horizontal_timeline.2.0.min.js
* Removed the use of tinyMobile and smallTablet
Removed the use of `tinyMobile` and `smallTablet` in the media queries and changed the `mobile` and `tablet` query widths to include the missing widths accordingly.
* Removed redundant code and changed the default to options to the object options
- Removed the use of `tinyMobile` and `smallTablet` in the `checkMQ` function and various if statements due to being redundant (the `mobile` and `tablet` will now cover the missing widths in the CSS media queries). [Lines 811, 1099, 1633, 1852-1857]
- Changed the object options code so if no options are defined or both the single and the object options are defined, then it defaults to the new object options, otherwise use the deprecated single options. [Lines 263-275, 297-341, 1678-1699, 1826-1850]
* Update horizontal_timeline.2.0.min.css
* Rename horizontal_timeline.2.0.js to horizontal_timeline.2.0_v2.0.5.1.js
* Rename horizontal_timeline.2.0.min.js to horizontal_timeline.2.0_v2.0.5.1.min.js
* Rename horizontal_timeline.2.0.css to horizontal_timeline.2.0_v2.0.5.1.css
* Rename horizontal_timeline.2.0.min.css to horizontal_timeline.2.0_v2.0.5.1.min.css1 parent 5eda70c commit 38a3b44
File tree
11 files changed
+2311
-1968
lines changed- JavaScript
- css
11 files changed
+2311
-1968
lines changedThis file was deleted.
This file was deleted.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | | - | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
| 82 | + | |
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
83 | 104 | | |
84 | 105 | | |
85 | 106 | | |
| |||
95 | 116 | | |
96 | 117 | | |
97 | 118 | | |
98 | | - | |
| 119 | + | |
| 120 | + | |
99 | 121 | | |
100 | 122 | | |
101 | 123 | | |
| |||
113 | 135 | | |
114 | 136 | | |
115 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
116 | 170 | | |
117 | 171 | | |
118 | 172 | | |
119 | 173 | | |
120 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
121 | 185 | | |
122 | 186 | | |
123 | 187 | | |
124 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
125 | 191 | | |
126 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
7 | 11 | | |
8 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
5 | 58 | | |
6 | 59 | | |
7 | 60 | | |
| |||
63 | 116 | | |
64 | 117 | | |
65 | 118 | | |
66 | | - | |
| 119 | + | |
67 | 120 | | |
68 | 121 | | |
69 | 122 | | |
| |||
0 commit comments