Skip to content

Bilal/settings cleanup #151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/powerbi-visual/src/settings/cameraSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ export class CameraSettings extends fs.SimpleCard {
value: 'perspective'
})

public allowCameraUnder = new fs.ToggleSwitch({
name: 'allowCameraUnder',
displayName: 'Allow under model',
value: false
})

public zoomOnDataChange = new fs.ToggleSwitch({
name: 'zoomOnDataChange',
displayName: 'Zoom extent on change',
Expand All @@ -29,7 +23,6 @@ export class CameraSettings extends fs.SimpleCard {
slices: fs.Slice[] = [
this.defaultView,
this.projection,
this.allowCameraUnder,
this.zoomOnDataChange
]
}
9 changes: 1 addition & 8 deletions src/powerbi-visual/src/settings/visualSettingsModel.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
import { formattingSettings as fs } from 'powerbi-visuals-utils-formattingmodel'
import { ColorSelectorSettings, ColorSettings } from 'src/settings/colorSettings'
import { CameraSettings } from 'src/settings/cameraSettings'
import { LightingSettings } from 'src/settings/lightingSettings'

export class SpeckleVisualSettingsModel extends fs.Model {
// Building my visual formatting settings card
public color: ColorSettings = new ColorSettings()

public colorSelector: ColorSelectorSettings = new ColorSelectorSettings()

public camera: CameraSettings = new CameraSettings()

public lighting: LightingSettings = new LightingSettings()

cards = [this.color, this.camera, this.lighting]
cards = [this.color]
}
9 changes: 5 additions & 4 deletions src/powerbi-visual/src/visual.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,11 @@ export class Visual implements IVisual {
}

public getFormattingModel(): powerbi.visuals.FormattingModel {
console.log('Showing Formatting settings', this.formattingSettings)
const model = this.formattingSettingsService.buildFormattingModel(this.formattingSettings)
console.log('Formatting model was created', model)
return model
// Return an empty model for custom settings
// This will still maintain the General tab that's added automatically by PowerBI
return {
cards: []
}
}

private updateViewer(input: SpeckleDataInput) {
Expand Down