1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/frontend/app/model/IRenderable.ts

17 lines
350 B
TypeScript
Raw Normal View History

export interface IRenderable {
getDimension(): Dimension;
}
2016-12-30 18:58:04 +08:00
export interface Dimension {
top: number;
left: number;
width: number;
height: number;
}
2017-07-11 04:00:22 +08:00
export module Dimension {
export const toString = (dim: Dimension) => {
return {top: dim.top + "px", left: dim.left + "px", width: dim.width + "px", height: dim.height + "px"};
}
}