Skip to content

Commit d72d4c4

Browse files
committed
ScaleManger - better FS init, documentation
- Added `onFullScreenInit` signal which is the correct place for a client to alter the FS target element, such as to set a background color or add a CSS class. - Increased documentation overview and specificity including expected Parent behavior, sizing calculations, and when `refresh` may be required. - Grouped documentation for scale modes (in 'scaleMode') - Separated out internal/deprecated `setScreenSize` method from `updateLayout`. There are no known breaking changes.
1 parent 497a9ec commit d72d4c4

2 files changed

Lines changed: 231 additions & 113 deletions

File tree

docs/scripts/toc.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,15 @@ jQuery.fn.toc.defaults = {
201201
return $heading.text();
202202
},
203203
itemClass: function(i, heading, $heading, prefix) {
204-
return prefix + '-' + $heading[0].tagName.toLowerCase();
204+
// Remove all classes not starting like 'toc-'
205+
var tocClasses = ($heading.attr('class') || '')
206+
.replace(/\b\S+/gi, function (m) {
207+
return m.indexOf("toc-") === 0 ? m : '';
208+
});
209+
210+
var itemClass = prefix + '-' + $heading[0].tagName.toLowerCase();
211+
212+
return tocClasses + ' ' + itemClass;
205213
}
206214

207215
};

0 commit comments

Comments
 (0)