MCPcopy
hub / github.com/shzlw/zeu / drawMarker

Method drawMarker

src/volume-meter.js:103–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

101 }
102
103 drawMarker() {
104 const text = (this._minMax === 'max' || this._minMax === 'min') ? this._actualValue : this._value;
105
106 this._shape.fillRect(this._numberStart + this._meterWidth + this._lineWidth,
107 this._barY - 8, (this._viewWidth - (this._numberStart + this._meterWidth + this._lineWidth)), 16,
108 this.markerBgColor);
109
110 this._shape.fillRect(0, this._barY - this._lineWidth / 2,
111 this._numberStart + this._meterWidth + this._lineWidth, this._lineWidth, this.markerBgColor);
112
113 this._shape.fillText(text, (this._viewWidth - this._meterWidth) / 4 * 3 + this._meterWidth, this._barY + 4,
114 '10px Arial', 'center', this._markerFontColor);
115 }
116
117 set value(value) {
118 let n = value;

Callers 1

drawObjectMethod · 0.95

Calls 2

fillRectMethod · 0.80
fillTextMethod · 0.80

Tested by

no test coverage detected