swirl/assets/swirl/ts/index.ts
2018-04-03 16:02:44 +08:00

19 lines
640 B
TypeScript

///<reference path="core/core.ts" />
///<reference path="core/chart.ts" />
namespace Swirl {
import ChartDashboard = Swirl.Core.ChartDashboard;
export class IndexPage {
private dashboard: ChartDashboard;
constructor() {
this.dashboard = new ChartDashboard("#div-charts", window.charts, {name: "home"});
dragula([$('#div-charts').get(0)], {
moves: function (el, container, handle): boolean {
return $(handle).closest('a.drag').length > 0;
// return handle.classList.contains('drag');
}
});
}
}
}