added 260907 version of worker toolkit

This commit is contained in:
2026-09-08 20:30:51 -04:00
parent cbd3f0f8ca
commit 97aca37663
1283 changed files with 142951 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
import Ember from 'ember';
let {
set,
computed,
Component,
getProperties,
} = Ember;
export default Component.extend({
unit: '',
tagName: 'g',
labelSize: 12,
linesOffset: 0,
init() {
this._super(...arguments);
Ember.run.scheduleOnce('afterRender', () => {
const labelsBox = this.$().find('.ruler-labels')[0].getBBox();
set(this, 'linesOffset', labelsBox.x + labelsBox.width);
});
},
rulers: computed('yRulers', function() {
const {
unit,
yScale,
labelSize,
yRulers,
} = getProperties(this, 'unit', 'yScale', 'labelSize', 'yRulers');
return (yRulers || [])
.map(item => {
const lineY = yScale(item);
return {
lineY,
label: `${item}${unit}`,
labelY: lineY + labelSize / 2 - 2,
};
});
}),
});