Initial implementation

This commit is contained in:
Piotr Pekala 2019-06-19 06:38:50 -07:00
parent 4ed93ed6ab
commit ba478d4894
3 changed files with 19 additions and 1 deletions

View File

@ -148,6 +148,16 @@
/>
</svg>
</button>
<mat-divider class="divider" [vertical]="true"></mat-divider>
<button
matTooltip="Lock or unlock all items"
mat-icon-button
class="menu-button"
[color]="isLocked ? 'primary' : 'basic'"
(click)="changeLockValue()"
>
<mat-icon>lock</mat-icon>
</button>
<button class="arrow-button" mat-icon-button (click)="hideMenu()"><mat-icon>keyboard_arrow_left</mat-icon></button>
</div>

View File

@ -80,7 +80,7 @@ g.node:hover {
}
.extended {
width: 640px !important;
width: 720px !important;
height: 100%;
overflow: hidden;
}

View File

@ -44,6 +44,7 @@ import { MapLink } from '../../cartography/models/map/map-link';
import { MapLinkToLinkConverter } from '../../cartography/converters/map/map-link-to-link-converter';
import { LinkWidget } from '../../cartography/widgets/link';
import { NodeCreatedLabelStylesFixer } from './helpers/node-created-label-styles-fixer';
import { MovingTool } from '../../cartography/tools/moving-tool';
@Component({
@ -78,6 +79,7 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
isTextChosen: false,
visibility: false
};
protected isLocked: boolean = false;
private inReadOnlyMode = false;
@ -109,6 +111,7 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
private toolsService: ToolsService,
private selectionManager: SelectionManager,
private selectionTool: SelectionTool,
private movingTool: MovingTool,
private recentlyOpenedProjectService: RecentlyOpenedProjectService,
private nodeCreatedLabelStylesFixer: NodeCreatedLabelStylesFixer
) {}
@ -395,6 +398,11 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
imageToUpload.src = window.URL.createObjectURL(file);
}
public changeLockValue() {
this.isLocked = !this.isLocked;
this.movingTool.setEnabled(this.isLocked);
}
public ngOnDestroy() {
this.drawingsDataSource.clear();
this.nodesDataSource.clear();