Skip to content

Commit

Permalink
Fixed some issues with viewport
Browse files Browse the repository at this point in the history
  • Loading branch information
Margarida Prozil Vieita committed May 28, 2017
1 parent 478b6bd commit 28112d8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Binary file modified dist/playAxis.pbiviz
Binary file not shown.
2 changes: 1 addition & 1 deletion pbiviz.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"visual": {
"name": "playAxis",
"displayName": "Play Axis",
"guid": "PBI_CV_8CBD39D2_8133_44C9_AE4A_D2A6F37F3719",
"guid": "PBI_CV_16948668_E17D_454B_8664_2F2C470EA8C2",
"visualClassName": "Visual",
"version": "1.1.0",
"description": "Play axis that works like a dynamic slicer, animating other visuals. It has controls like play, pause, stop, previous and next, allowing a report and its visuals to play without user interaction. This visual accepts any parameter to be played and has some settings like colours, font size and transition options, to be customized by the user. This component was developed at Analytics & Data Science Department of São João Hospital (Porto, Portugal).",
Expand Down
10 changes: 4 additions & 6 deletions src/playAxis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,18 +304,16 @@ module powerbi.extensibility.visual {
let fontSize = viewModel.settings.captionSettings.fontSize;
this.svg.select("#label").attr("font-size", fontSize);

let myViewBox = options.viewport;

this.fieldName = options.dataViews[0].categorical.categories[0].source.displayName;

//Change title
if (this.visualSettings.captionSettings.show) {
this.updateCaption(this.fieldName);

let node: any = <SVGElement>this.svg.select("#label").node();
let TextWidth = node.getBBox();

let viewBoxWidth = 155 + TextWidth.width;
let TextBBox = node.getBBox();
let viewBoxWidth = 155 + TextBBox.width;
this.controlsSVG
.attr("viewBox","0 0 " + viewBoxWidth + " 24")
.attr('preserveAspectRatio','xMinYMid');
Expand Down

0 comments on commit 28112d8

Please sign in to comment.