Skip to content

Commit fa73a2f

Browse files
committed
fix: improve color retrieval in Poline class and clean up CSS comments
1 parent 4de3802 commit fa73a2f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

dist/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,13 +1148,13 @@
11481148
label {
11491149
border-color: var(--line);
11501150
}
1151-
1151+
/*
11521152
.wheel__line {
11531153
stroke: var(--dark);
11541154
}
11551155
.wheel__point {
11561156
stroke: var(--dark);
1157-
}
1157+
}*/
11581158
.key {
11591159
background: var(--light);
11601160
color: var(--dark);

dist/index.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ var Poline = class {
517517
* getColorAt(1) // Returns color at the very end
518518
*/
519519
getColorAt(t) {
520+
var _a;
520521
if (t < 0 || t > 1) {
521522
throw new Error("Position must be between 0 and 1");
522523
}
@@ -533,7 +534,7 @@ var Poline = class {
533534
const pair = this._anchorPairs[actualSegmentIndex];
534535
if (!pair || pair.length < 2 || !pair[0] || !pair[1]) {
535536
return new ColorPoint({
536-
color: this.anchorPoints[0]?.color || [0, 0, 0],
537+
color: ((_a = this.anchorPoints[0]) == null ? void 0 : _a.color) || [0, 0, 0],
537538
invertedLightness: this._invertedLightness
538539
});
539540
}
@@ -584,3 +585,4 @@ export {
584585
randomHSLPair,
585586
randomHSLTriple
586587
};
588+
//# sourceMappingURL=index.mjs.map

0 commit comments

Comments
 (0)