syinpoSlicer/src/managers/layoutManager.ts

26 lines
1.0 KiB
TypeScript

"Use strict";
import powerbi from "powerbi-visuals-api";
import DataView = powerbi.DataView;
import * as visualInterfaces from "../visual/visualInterfaces";
import * as d3 from "d3";
import { ILayoutManager,IFilterManager } from "../visual/visualInterfaces";
import { IFilter } from "powerbi-models";
type Selection<T extends d3.BaseType> = d3.Selection<T, any, any, any>;
export class LayoutManager implements ILayoutManager{
layout:Selection<HTMLElement>;
// constructor(layout:Selection<HTMLElement>){
// this.layout=layout;
// }
header:Selection<HTMLDivElement>
constructor(layout:Selection<HTMLElement>,filterManager:IFilterManager){
this.layout=layout;
this.header=this.layout.append('div').attr('header',true);
this.header.append('button').attr('clear',true).text('clear').on('click',function(){
filterManager.clear();
});
}
update(dataView:DataView,width:number,height:number):void{
//this.layout.style("width",width+"px").style("height",height+"px");
}
}