Fixed first section in scroll link extension
This commit is contained in:
parent
d8bfb94cbd
commit
4e2ad5766b
@ -54,16 +54,19 @@ define([
|
||||
var htmlSectionOffset;
|
||||
var previewScrollTop = $previewElt.scrollTop();
|
||||
$previewElt.find(".preview-content > .se-section-delimiter").each(function() {
|
||||
if(htmlSectionOffset === undefined) {
|
||||
// Force start to 0 for the first section
|
||||
htmlSectionOffset = 0;
|
||||
return;
|
||||
}
|
||||
var $delimiterElt = $(this);
|
||||
// Consider div scroll position
|
||||
var newSectionOffset = $delimiterElt.position().top + previewScrollTop;
|
||||
if(htmlSectionOffset !== undefined) {
|
||||
htmlSectionList.push({
|
||||
startOffset: htmlSectionOffset,
|
||||
endOffset: newSectionOffset,
|
||||
height: newSectionOffset - htmlSectionOffset
|
||||
});
|
||||
}
|
||||
htmlSectionOffset = newSectionOffset;
|
||||
});
|
||||
// Last section
|
||||
|
@ -298,7 +298,7 @@
|
||||
<label class="col-lg-4 control-label"
|
||||
for="input-import-image-size">Size limit (optional)</label>
|
||||
<div class="col-lg-7 form-inline">
|
||||
<input type="text" id="input-import-image-size" placeholder="123"
|
||||
<input type="text" id="input-import-image-size" placeholder="0"
|
||||
class="col-lg-3 form-control"> px
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user