diff --git a/src/jquery.fancytree.wide.js b/src/jquery.fancytree.wide.js index 64b881ab..58a3598b 100644 --- a/src/jquery.fancytree.wide.js +++ b/src/jquery.fancytree.wide.js @@ -57,7 +57,8 @@ function defineHeadStyleElement(id, cssText) { } /* Calculate the CSS rules that indent title spans. */ -function renderLevelCss(containerId, depth, levelOfs, lineOfs, measureUnit) { +function renderLevelCss(containerId, depth, levelOfs, lineOfs, measureUnit, labelOfs) +{ var i, prefix = "#" + containerId + " span.fancytree-level-", rules = []; @@ -70,7 +71,7 @@ function renderLevelCss(containerId, depth, levelOfs, lineOfs, measureUnit) { // This breaks the left:0 and padding-left:nn settings of the title rules.push("#" + containerId + " div.ui-effects-wrapper ul li span.fancytree-title " + - "{ padding-left: 3px; position: static; width: auto; }"); + "{ padding-left: " + labelOfs + measureUnit + "; position: static; width: auto; }"); return rules.join("\n"); } @@ -110,16 +111,17 @@ $.ui.fancytree.registerExtension({ version: "@VERSION", // Default options for this extension. options: { - iconWidth: null, // Adjust this if @fancy-icon-width != "16px" - iconSpacing: null, // Adjust this if @fancy-icon-spacing != "3px" - levelOfs: null // Adjust this if ul padding != "16px" + iconWidth: null, // Adjust this if @fancy-icon-width != "16px" + iconSpacing: null, // Adjust this if @fancy-icon-spacing != "3px" + labelSpacing: null, // Adjust this if padding between icon and label ! = "3px" + levelOfs: null // Adjust this if ul padding != "16px" }, treeCreate: function(ctx){ this._superApply(arguments); this.$container.addClass("fancytree-ext-wide"); - var containerId, cssText, iconSpacingUnit, iconWidthUnit, levelOfsUnit, + var containerId, cssText, iconSpacingUnit, labelSpacingUnit, iconWidthUnit, levelOfsUnit, instOpts = ctx.options.wide, // css sniffing $dummyLI = $("