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> </svg>
</button> </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> <button class="arrow-button" mat-icon-button (click)="hideMenu()"><mat-icon>keyboard_arrow_left</mat-icon></button>
</div> </div>

View File

@ -80,7 +80,7 @@ g.node:hover {
} }
.extended { .extended {
width: 640px !important; width: 720px !important;
height: 100%; height: 100%;
overflow: hidden; 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 { MapLinkToLinkConverter } from '../../cartography/converters/map/map-link-to-link-converter';
import { LinkWidget } from '../../cartography/widgets/link'; import { LinkWidget } from '../../cartography/widgets/link';
import { NodeCreatedLabelStylesFixer } from './helpers/node-created-label-styles-fixer'; import { NodeCreatedLabelStylesFixer } from './helpers/node-created-label-styles-fixer';
import { MovingTool } from '../../cartography/tools/moving-tool';
@Component({ @Component({
@ -78,6 +79,7 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
isTextChosen: false, isTextChosen: false,
visibility: false visibility: false
}; };
protected isLocked: boolean = false;
private inReadOnlyMode = false; private inReadOnlyMode = false;
@ -109,6 +111,7 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
private toolsService: ToolsService, private toolsService: ToolsService,
private selectionManager: SelectionManager, private selectionManager: SelectionManager,
private selectionTool: SelectionTool, private selectionTool: SelectionTool,
private movingTool: MovingTool,
private recentlyOpenedProjectService: RecentlyOpenedProjectService, private recentlyOpenedProjectService: RecentlyOpenedProjectService,
private nodeCreatedLabelStylesFixer: NodeCreatedLabelStylesFixer private nodeCreatedLabelStylesFixer: NodeCreatedLabelStylesFixer
) {} ) {}
@ -395,6 +398,11 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
imageToUpload.src = window.URL.createObjectURL(file); imageToUpload.src = window.URL.createObjectURL(file);
} }
public changeLockValue() {
this.isLocked = !this.isLocked;
this.movingTool.setEnabled(this.isLocked);
}
public ngOnDestroy() { public ngOnDestroy() {
this.drawingsDataSource.clear(); this.drawingsDataSource.clear();
this.nodesDataSource.clear(); this.nodesDataSource.clear();