1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-12-16 11:37:13 +02:00
pigallery2/frontend/app/model/IRenderable.ts

17 lines
351 B
TypeScript
Raw Normal View History

export interface IRenderable {
getDimension(): Dimension;
}
2016-12-30 12:58:04 +02:00
export interface Dimension {
top: number;
left: number;
width: number;
height: number;
}
2017-07-10 22:00:22 +02:00
export module Dimension {
export const toString = (dim: Dimension) => {
2018-03-30 21:30:30 +02:00
return {top: dim.top + 'px', left: dim.left + 'px', width: dim.width + 'px', height: dim.height + 'px'};
};
2017-07-10 22:00:22 +02:00
}