0
我正在設置帶有標籤和規則的dijit.form.HorizontalSlider
,我無法使顯示器正常工作。滑塊顯示在規則和標籤的頂部。我可以看到,標籤和規則被放置的div沒有高度屬性,我猜這就是我的問題,但我似乎無法修復它。Dojo Horizontal Slider在標籤上顯示
下面的代碼...
//create a div for the rule in my inner node div
this.ruleDiv = dojo.create("div", {}, dojo.byId("ruleDiv"), "first");
this.getInnerNode().appendChild(this.ruleDiv);
//create a div for the labels in my inner node div
this.labelsDiv = dojo.create("div", {},dojo.byId("labelsDiv"), "first");
this.getInnerNode().appendChild(this.labelsDiv);
//create the rule object
this.sliderLabelsRule = new HorizontalRule({
container: "topDecoration",
count: 10
}, this.getLabelsRuleDiv());
//create the labels object
this.sliderLabels = new HorizontalRuleLabels({
container: "topDecoration",
labelStyle: "font-size: 10px;",
labels: ["test0", "test1", "test2", "test3", "test4", "test5",
"test6", "test7", "test8", "test9"]
}, this.getLabelsDiv());
//create the slider
this.slider = new Slider({}, this.getInnerNode());
//startup the widgets
this.getSlider().startup();
this.getLabelsRule().startup();
this.getLabels().startup();
我試着換周圍的東西,這個嘗試一堆不同的方式,但我似乎無法找到正確的組合,任何幫助表示讚賞!
男人,我可以像一年前一樣使用你。我不知道我是否能夠解決這個問題,因爲在項目結束的時候我已經接近尾聲了,而且我從那以後就開始了。我會給你正確的答案,因爲它是有道理的,希望它能在將來幫助別人。 – Shaded
謝謝,是的,我今天真的遇到了這個問題,當找到一個答案發現這個,所以一旦我終於想通了,我想我不妨將它發佈在這裏供將來參考 –