Math is hard
This commit is contained in:
+1
-2
@@ -3,7 +3,7 @@ export interface Playset {
|
||||
readonly height: number
|
||||
readonly width: number
|
||||
readonly cels: Cel[]
|
||||
readonly enabledSets: boolean[]
|
||||
readonly sets: boolean[]
|
||||
}
|
||||
|
||||
export interface Cel {
|
||||
@@ -11,7 +11,6 @@ export interface Cel {
|
||||
readonly fix: number
|
||||
readonly initialPositions: Coordinate[]
|
||||
readonly offset: Coordinate
|
||||
readonly sets: boolean[]
|
||||
|
||||
currentPositions: Coordinate[]
|
||||
currentFix: number
|
||||
|
||||
+2
-2
@@ -52,7 +52,7 @@ export default class Tracker {
|
||||
let element = elements[index] as HTMLDivElement
|
||||
element.style.visibility = "hidden"
|
||||
|
||||
if (cel.sets[set]) {
|
||||
if (cel.initialPositions[set] != null) {
|
||||
element.style.visibility = "visible"
|
||||
let position = Tracker.getCoordinate(cel, set)
|
||||
element.style.left = `${position.x}px`
|
||||
@@ -136,7 +136,7 @@ export default class Tracker {
|
||||
this.setPlayArea(this.set)
|
||||
})
|
||||
|
||||
this.playset.enabledSets.forEach((enabled, index) => {
|
||||
this.playset.sets.forEach((enabled, index) => {
|
||||
if (enabled) {
|
||||
let button = new Builder("li")
|
||||
.addChildren(new Builder("button")
|
||||
|
||||
Reference in New Issue
Block a user