mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-09 01:36:51 +01:00
* Rewrite animation logic * Review update 1 * Review update 2 * Review update 3 * Add 'none' to api.md
28 lines
506 B
JavaScript
28 lines
506 B
JavaScript
'use strict';
|
|
|
|
import {extend, inherits} from '../helpers/helpers.core';
|
|
import {isNumber} from '../helpers/helpers.math';
|
|
|
|
class Element {
|
|
|
|
constructor(configuration) {
|
|
extend(this, configuration);
|
|
|
|
// this.hidden = false; we assume Element has an attribute called hidden, but do not initialize to save memory
|
|
}
|
|
|
|
tooltipPosition() {
|
|
return {
|
|
x: this.x,
|
|
y: this.y
|
|
};
|
|
}
|
|
|
|
hasValue() {
|
|
return isNumber(this.x) && isNumber(this.y);
|
|
}
|
|
}
|
|
|
|
Element.extend = inherits;
|
|
export default Element;
|