Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/jnncks/meshUp
Browse files Browse the repository at this point in the history
  • Loading branch information
jnncks committed May 27, 2017
2 parents 5956353 + 24946e5 commit bce1d8b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions client/imports/app/graph-view/graph.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ export class GraphComponent implements AfterViewInit, OnChanges {

// subscribe to requestNodeFocus events
this._graphViewService.requestNodeFocus.subscribe((node: Node) => {
if (!node)
return;

// remove the current focus
this.removeNodeFocus();

Expand Down Expand Up @@ -1434,6 +1437,9 @@ export class GraphComponent implements AfterViewInit, OnChanges {
handleZoom = () => {
if (!d3.event || !d3.event.transform)
return;

if (!this._graphContainer || !this._graphContainer.nativeElement)
return;

const element: HTMLDivElement = this._graphContainer.nativeElement;
const containerWidth = element.offsetWidth;
Expand Down
3 changes: 3 additions & 0 deletions client/imports/app/graph-view/minimap.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ export class MiniMapComponent implements AfterViewInit, OnChanges {
* @method fitContainer
*/
fitContainer(maxScale?: number): void {
if (!this._miniMapContainer || !this._miniMapContainer.nativeElement)
return;

const element = this._miniMapContainer.nativeElement;
const svg = d3.select(element).select<SVGElement>('svg');
const graph = svg.select<SVGGElement>('g#graph');
Expand Down
2 changes: 1 addition & 1 deletion client/imports/app/graph-view/node-modal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ export class NodeModalComponent implements OnInit, AfterViewInit, OnChanges{
*/
navigateTo(node: Node) {
// request a zoom transition to the new node
this._graphViewService.focusOnNode(node, 150);
this._graphViewService.focusOnNode(node, 50);

// close this modal as a new modal will be opend after the transition
this.close();
Expand Down

0 comments on commit bce1d8b

Please sign in to comment.