fix: tagSize, tagColor and tagTransparency, version 2.0.0
This commit is contained in:
parent
15268a511f
commit
fd7efcbf73
@ -4,7 +4,7 @@
|
|||||||
"displayName": "picsScroller",
|
"displayName": "picsScroller",
|
||||||
"guid": "picsScroller4F6E5B21FAB94F2081F33542CFAD9E09",
|
"guid": "picsScroller4F6E5B21FAB94F2081F33542CFAD9E09",
|
||||||
"visualClassName": "Visual",
|
"visualClassName": "Visual",
|
||||||
"version": "1.1.0",
|
"version": "2.0.0",
|
||||||
"description": "scroll pictures",
|
"description": "scroll pictures",
|
||||||
"supportUrl": "https://blog.mujiannan.me",
|
"supportUrl": "https://blog.mujiannan.me",
|
||||||
"gitHubUrl": "https://www.github.com/mujiannan"
|
"gitHubUrl": "https://www.github.com/mujiannan"
|
||||||
|
@ -26,7 +26,9 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
import { Color, color, rgb } from "d3";
|
||||||
import { dataViewObjectsParser } from "powerbi-visuals-utils-dataviewutils";
|
import { dataViewObjectsParser } from "powerbi-visuals-utils-dataviewutils";
|
||||||
|
import { getFillColor } from "powerbi-visuals-utils-dataviewutils/lib/dataViewObjects";
|
||||||
import DataViewObjectsParser = dataViewObjectsParser.DataViewObjectsParser;
|
import DataViewObjectsParser = dataViewObjectsParser.DataViewObjectsParser;
|
||||||
|
|
||||||
export class VisualSettings extends DataViewObjectsParser {
|
export class VisualSettings extends DataViewObjectsParser {
|
||||||
@ -47,7 +49,7 @@ export class LayoutSettings{
|
|||||||
export class TagSettings{
|
export class TagSettings{
|
||||||
public show:boolean=false;
|
public show:boolean=false;
|
||||||
public textSize:number=12;
|
public textSize:number=12;
|
||||||
public fontColor:string="black";
|
public fontColor:Color=rgb(0,0,0);
|
||||||
public transparency:number=0;
|
public transparency:number=0;
|
||||||
public position:TagPosition=TagPosition.above;
|
public position:TagPosition=TagPosition.above;
|
||||||
}
|
}
|
||||||
|
@ -194,7 +194,8 @@ export class Visual implements IVisual {
|
|||||||
tagElement.className="pics-scroller-tag";
|
tagElement.className="pics-scroller-tag";
|
||||||
tagElement.style.fontSize=tagFontSize+"px";
|
tagElement.style.fontSize=tagFontSize+"px";
|
||||||
tagElement.style.height=1.5*tagFontSize+"px";
|
tagElement.style.height=1.5*tagFontSize+"px";
|
||||||
|
tagElement.style.color=settings.tag.fontColor.toString();
|
||||||
|
tagElement.style.opacity=(100-settings.tag.transparency)+"%";
|
||||||
if(settings.tag.position.toString()==TagPosition[TagPosition.above].toString()){
|
if(settings.tag.position.toString()==TagPosition[TagPosition.above].toString()){
|
||||||
logoContainer.insertBefore(tagElement,logo);
|
logoContainer.insertBefore(tagElement,logo);
|
||||||
}else{
|
}else{
|
||||||
|
Loading…
Reference in New Issue
Block a user