Skip to content

Commit

Permalink
Automated Code Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 682487306
  • Loading branch information
Google AI Edge authored and copybara-github committed Oct 4, 2024
1 parent ac9105a commit b33a61c
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions src/ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@angular/router": "^18.1.0",
"d3": "5.7.0",
"rxjs": "~7.8.0",
"safevalues": "0.6.0",
"safevalues": "0.7.0",
"three": "0.134.0",
"tslib": "^2.3.0",
"zone.js": "~0.14.3"
Expand Down
4 changes: 2 additions & 2 deletions src/ui/src/components/visualizer/graph_selector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {MatFormFieldModule} from '@angular/material/form-field';
import {MatIconModule} from '@angular/material/icon';
import {MatSelect, MatSelectModule} from '@angular/material/select';
import {MatTooltipModule} from '@angular/material/tooltip';
import {safeAnchorEl} from 'safevalues/dom';
import {setAnchorHref} from 'safevalues/dom';
import {AppService} from './app_service';
import {Graph, GraphCollection} from './common/input_graph';
import {exportToResource} from './common/utils';
Expand Down Expand Up @@ -231,7 +231,7 @@ export class GraphSelector {
const dataUrl = `data:text/json;charset=utf-8, ${encodeURIComponent(
JSON.stringify(this.selectedCollection, null, 2),
)}`;
safeAnchorEl.setHref(link, dataUrl);
setAnchorHref(link, dataUrl);
link.click();
}

Expand Down
4 changes: 2 additions & 2 deletions src/ui/src/components/visualizer/node_styler_dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {MatDialogModule} from '@angular/material/dialog';
import {MatIconModule} from '@angular/material/icon';
import {MatMenuModule} from '@angular/material/menu';
import {MatTooltipModule} from '@angular/material/tooltip';
import {safeAnchorEl} from 'safevalues/dom';
import {setAnchorHref} from 'safevalues/dom';

import {Bubble} from '../bubble/bubble';

Expand Down Expand Up @@ -160,7 +160,7 @@ export class NodeStylerDialog {
const dataUrl = `data:text/json;charset=utf-8, ${encodeURIComponent(
JSON.stringify(this.rules(), null, 2),
)}`;
safeAnchorEl.setHref(link, dataUrl);
setAnchorHref(link, dataUrl);
link.click();
}

Expand Down
4 changes: 2 additions & 2 deletions src/ui/src/components/visualizer/selection_panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
} from '@angular/core';
import {MatButtonModule} from '@angular/material/button';
import {MatIconModule} from '@angular/material/icon';
import {safeAnchorEl} from 'safevalues/dom';
import {setAnchorHref} from 'safevalues/dom';

import {AppService} from './app_service';
import {exportToResource} from './common/utils';
Expand Down Expand Up @@ -73,7 +73,7 @@ export class SelectionPanel {
const dataUrl = `data:text/json;charset=utf-8, ${encodeURIComponent(
JSON.stringify([subgraph], null, 2),
)}`;
safeAnchorEl.setHref(link, dataUrl);
setAnchorHref(link, dataUrl);
link.click();
}

Expand Down
4 changes: 2 additions & 2 deletions src/ui/src/components/visualizer/webgl_renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import {MatIconModule} from '@angular/material/icon';
import {MatMenuModule, MatMenuTrigger} from '@angular/material/menu';
import {MatSnackBar} from '@angular/material/snack-bar';
import {MatTooltip, MatTooltipModule} from '@angular/material/tooltip';
import {safeAnchorEl} from 'safevalues/dom';
import {setAnchorHref} from 'safevalues/dom';
import * as three from 'three';

import {AppService} from './app_service';
Expand Down Expand Up @@ -2633,7 +2633,7 @@ export class WebglRenderer implements OnInit, OnDestroy {
// Download canvas data as png.
const link = document.createElement('a');
link.download = 'model_explorer_graph.png';
safeAnchorEl.setHref(link, canvas.toDataURL());
setAnchorHref(link, canvas.toDataURL());
link.click();
this.webglRendererThreejsService.setSceneBackground(
new THREE.Color(0xffffff),
Expand Down
4 changes: 2 additions & 2 deletions src/ui/src/services/server_director_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* ==============================================================================
*/

import {safeLocation} from 'safevalues/dom';
import {setLocationHref} from 'safevalues/dom';
import {IS_EXTERNAL} from '../common/flags';
import {INTERNAL_COLAB} from '../common/utils';

Expand Down Expand Up @@ -55,7 +55,7 @@ export class ServerDirectorService {
switch (directive.name) {
// Refresh page with the given url.
case DirectiveName.RefreshPage:
safeLocation.setHref(
setLocationHref(
window.location,
directive.url,
);
Expand Down

0 comments on commit b33a61c

Please sign in to comment.