mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-22 14:09:30 -07:00
move all interfaces to utils.ts
This commit is contained in:
@@ -1,9 +1,4 @@
|
|||||||
interface ImageData {
|
import { type ImageData } from './utils'
|
||||||
index: string
|
|
||||||
url: string
|
|
||||||
imgH: string
|
|
||||||
imgW: string
|
|
||||||
}
|
|
||||||
|
|
||||||
// fetch images info from JSON
|
// fetch images info from JSON
|
||||||
const imageArrayElement = document.getElementById('images_array') as HTMLScriptElement
|
const imageArrayElement = document.getElementById('images_array') as HTMLScriptElement
|
||||||
|
|||||||
@@ -1,14 +1,9 @@
|
|||||||
import { overlayEnable } from './overlay'
|
import { overlayEnable } from './overlay'
|
||||||
import { posCache, FIFO, layersPosSet, center } from './utils'
|
import { posCache, FIFO, layersPosSet, center, type position } from './utils'
|
||||||
import { thresholdSensitivityArray, thresholdIndex } from './thresholdCtl'
|
import { thresholdSensitivityArray, thresholdIndex } from './thresholdCtl'
|
||||||
import { imgIndexSpanUpdate } from './indexDisp'
|
import { imgIndexSpanUpdate } from './indexDisp'
|
||||||
import { imagesArrayLen, imagesArray } from './dataFetch'
|
import { imagesArrayLen, imagesArray } from './dataFetch'
|
||||||
|
|
||||||
export interface position {
|
|
||||||
x: number
|
|
||||||
y: number
|
|
||||||
}
|
|
||||||
|
|
||||||
// get layer divs
|
// get layer divs
|
||||||
const layer5 = document.getElementById('layer5') as HTMLDivElement
|
const layer5 = document.getElementById('layer5') as HTMLDivElement
|
||||||
const layer4 = document.getElementById('layer4') as HTMLDivElement
|
const layer4 = document.getElementById('layer4') as HTMLDivElement
|
||||||
|
|||||||
@@ -1,3 +1,15 @@
|
|||||||
|
export interface ImageData {
|
||||||
|
index: string
|
||||||
|
url: string
|
||||||
|
imgH: string
|
||||||
|
imgW: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface position {
|
||||||
|
x: number
|
||||||
|
y: number
|
||||||
|
}
|
||||||
|
|
||||||
// cache a xy position to array
|
// cache a xy position to array
|
||||||
export const posCache = (x: number, y: number, xyArray: string[][]): void => {
|
export const posCache = (x: number, y: number, xyArray: string[][]): void => {
|
||||||
// pop element if length surpass limitation
|
// pop element if length surpass limitation
|
||||||
|
|||||||
Reference in New Issue
Block a user