Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#18113 closed defect (fixed)

dijit/form/HorizontalRuleLabels: HorizontalRuleLabels#labels is static when not supplied on construction

Reported by: Johnny Shepherd Owned by: Bill Keese <[email protected]…>
Priority: undecided Milestone: 1.11
Component: Dijit - Form Version: 1.10.0
Keywords: Cc:
Blocked By: Blocking:


When is happens:

  • Programmatically instantiating
  • A value for 'labels' is not provided to the constructor

Why it happens:

  • The 'labels' member is declared and initialised as an empty array in the class declaration


	var HorizontalRuleLabels = declare("dijit.form.HorizontalRuleLabels", HorizontalRule, {
		// summary:
		//		Labels for `dijit/form/HorizontalSlider`

		templateString: '<div class="dijitRuleContainer dijitRuleContainerH dijitRuleLabelsContainer dijitRuleLabelsContainerH"></div>',

		// labelStyle: String
		//		CSS style to apply to individual text labels
		labelStyle: "",

		// labels: String[]?
		//		Array of text labels to render - evenly spaced from left-to-right or bottom-to-top.
		//		Alternately, minimum and maximum can be specified, to get numeric labels.
		labels: [],


A Fix:

Work Around: Supply a value for HorizontalRuleLabels#labels? when call the constructor eg:

var bob  = new HorizontalRuleLabels({
            container: "topDecoration",
            style: "height: 12px",
            minimum: 0,
            maximum: 0.9,
            count: 10


Change History (3)

comment:1 Changed 8 years ago by bill

Good catch. We might need to have [] in the prototype so the API doc is generated correctly, but we can definitely do this.labels = [] in the constructor (before the user specified properties are mixed in).

comment:2 Changed 8 years ago by Bill Keese <[email protected]…>

Owner: set to Bill Keese <[email protected]…>
Resolution: fixed
Status: newclosed

In 66d5fa31ff90708eec400d4850e27449a557ae73/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:3 Changed 8 years ago by bill

Milestone: tbd1.11
Note: See TracTickets for help on using tickets.