From a36876ca322a9724d0c931c3e4b8d30d4cc35299 Mon Sep 17 00:00:00 2001 From: Brett van de Sande Date: Thu, 10 Aug 2017 16:06:23 -0700 Subject: [PATCH] fixes #19042, Update Axes.js to access Label correctly --- drawing/annotations/Label.js | 2 -- drawing/stencil/_Base.js | 4 ++-- drawing/tools/custom/Axes.js | 6 +++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drawing/annotations/Label.js b/drawing/annotations/Label.js index 5f7c9675bc..d395eb43d5 100644 --- a/drawing/annotations/Label.js +++ b/drawing/annotations/Label.js @@ -1,8 +1,6 @@ define(["exports", "dojo/_base/lang", "../util/oo", "../stencil/Text"], function(exports, lang, oo, Text){ -// TODO: why not just return Label? - exports.Label = oo.declare( Text, function(/*Object*/options){ diff --git a/drawing/stencil/_Base.js b/drawing/stencil/_Base.js index e7eab0f664..3820a20160 100644 --- a/drawing/stencil/_Base.js +++ b/drawing/stencil/_Base.js @@ -1,6 +1,6 @@ define(["dojo", "dojo/fx/easing", "../util/oo", "../annotations/BoxShadow", "../annotations/Angle", "../annotations/Label", "../defaults"], -function(dojo, easing, oo, BoxShadow, Angle, LabelExports, defaults){ +function(dojo, easing, oo, BoxShadow, Angle, Label, defaults){ /*===== var StencilArgs = { @@ -844,7 +844,7 @@ var Base = oo.declare( // text: String // The text to set as the label. if(!this._label){ - this._label = new LabelExports.Label({ + this._label = new Label.Label({ text:text, util:this.util, mouse:this.mouse, diff --git a/drawing/tools/custom/Axes.js b/drawing/tools/custom/Axes.js index f873b86b54..3096a532ab 100644 --- a/drawing/tools/custom/Axes.js +++ b/drawing/tools/custom/Axes.js @@ -101,14 +101,14 @@ var Axes = oo.declare( // NOTE: Not passing style into text because it's changing it var props = {align:"middle", valign:"middle", util:this.util, annotation:true, container:this.container, mouse:this.mouse, stencil:this}; - this.labelX = new Label(lang.mixin(props,{ + this.labelX = new Label.Label(lang.mixin(props,{ labelPosition:this.setLabelX })); - this.labelY = new Label(lang.mixin(props,{ + this.labelY = new Label.Label(lang.mixin(props,{ labelPosition:this.setLabelY })); if(this.style.zAxisEnabled){ - this.labelZ = new Label(lang.mixin(props,{ + this.labelZ = new Label.Label(lang.mixin(props,{ labelPosition:this.setLabelZ })); }