Skip to content
Snippets Groups Projects
Unverified Commit ffb36afb authored by xgui3783's avatar xgui3783 Committed by GitHub
Browse files

Merge pull request #298 from HumanBrainProject/chore/bugfix_minorTweak

bugfix: floating widget unit starting position
parents 31184b74 203aa1bd
No related branches found
No related tags found
No related merge requests found
...@@ -171,6 +171,11 @@ export class WidgetUnit implements OnInit, OnDestroy{ ...@@ -171,6 +171,11 @@ export class WidgetUnit implements OnInit, OnDestroy{
/* floating widget specific functionalities */ /* floating widget specific functionalities */
@HostBinding('style.transform')
get styleTransform() {
return this.state === 'floating' ? `translate(${this.position.map(v => v + 'px').join(',')})` : null
}
position : [number,number] = [400,100] position : [number,number] = [400,100]
get isMobile(){ get isMobile(){
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
(click)="isFaved ? removeFromFav() : saveToFav()" (click)="isFaved ? removeFromFav() : saveToFav()"
[class]="(isFaved ? 'text-primary' : 'text-muted') + ' ds-container ml-1 p-2 preview-container d-flex align-items-center'" [class]="(isFaved ? 'text-primary' : 'text-muted') + ' ds-container ml-1 p-2 preview-container d-flex align-items-center'"
[hoverable]="{translateY:-3}"> [hoverable]="{translateY:-3}">
<i class="fas fa-star"></i> <i class="fas fa-thumbtack"></i>
</div> </div>
</div> </div>
......
...@@ -182,7 +182,7 @@ export class MenuIconsBar{ ...@@ -182,7 +182,7 @@ export class MenuIconsBar{
public clickPluginIcon(manifest: PluginManifest){ public clickPluginIcon(manifest: PluginManifest){
this.pluginServices.launchPlugin(manifest) this.pluginServices.launchPlugin(manifest)
.catch(this.constantService.catchError) .catch(err => this.constantService.catchError(err))
} }
public searchIconClickHandler(wu: WidgetUnit){ public searchIconClickHandler(wu: WidgetUnit){
......
...@@ -269,10 +269,10 @@ ...@@ -269,10 +269,10 @@
<!-- star --> <!-- star -->
<div <div
(click)="favKgSearch($event, wu)" (click)="favKgSearch($event, wu)"
matTooltip="Favourite (NYI)" matTooltip="Pin (NYI)"
matTooltipPosition="below" matTooltipPosition="below"
[class]="(skeletonBtnClass$ | async) + ' text-muted'"> [class]="(skeletonBtnClass$ | async) + ' text-muted'">
<i class="far fa-star"></i> <i class="fas fa-thumbtack"></i>
</div> </div>
<!-- close --> <!-- close -->
......
...@@ -31,11 +31,11 @@ ...@@ -31,11 +31,11 @@
[matBadge]="(favDataEntries$ | async)?.length > 0 ? (favDataEntries$ | async)?.length : null " [matBadge]="(favDataEntries$ | async)?.length > 0 ? (favDataEntries$ | async)?.length : null "
matBadgeColor="accent" matBadgeColor="accent"
matBadgePosition="above before" matBadgePosition="above before"
matTooltip="Favourite datasets" matTooltip="Pinned datasets"
matTooltipPosition="before" matTooltipPosition="before"
mat-fab mat-fab
color="primary"> color="primary">
<i class="fas fa-star"></i> <i class="fas fa-thumbtack"></i>
</button> </button>
</div> </div>
...@@ -154,12 +154,12 @@ ...@@ -154,12 +154,12 @@
<ng-template #savedDatasets> <ng-template #savedDatasets>
<mat-list rol="list"> <mat-list rol="list">
<h3 mat-subheader>Favourite Datasets</h3> <h3 mat-subheader>Pinned Datasets</h3>
<!-- place holder when no fav data is available --> <!-- place holder when no fav data is available -->
<mat-card *ngIf="(!(favDataEntries$ | async)) || (favDataEntries$ | async).length === 0"> <mat-card *ngIf="(!(favDataEntries$ | async)) || (favDataEntries$ | async).length === 0">
<mat-card-content class="muted"> <mat-card-content class="muted">
No dataset favourited... yet. No pinned dataset ... yet.
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
<!-- remove from fav --> <!-- remove from fav -->
<button <button
(click)="removeFav($event, ds)" (click)="removeFav($event, ds)"
matTooltip="Remove Favourite" matTooltip="Remove Pin"
matTooltipPosition="after" matTooltipPosition="after"
color="warn" color="warn"
class="flex-grow-0 flex-shrink-0" class="flex-grow-0 flex-shrink-0"
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
matTooltipPosition="below" matTooltipPosition="below"
(click)="showHelp()" (click)="showHelp()"
mat-icon-button mat-icon-button
color="basic"> color="primary">
<i class="fas fa-question"></i> <i class="fas fa-question"></i>
</button> </button>
</div> </div>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
matTooltipPosition="below" matTooltipPosition="below"
(click)="showSetting(settingTemplate)" (click)="showSetting(settingTemplate)"
mat-icon-button mat-icon-button
color="basic"> color="primary">
<i class="fas fa-cog"></i> <i class="fas fa-cog"></i>
</button> </button>
</div> </div>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment