Skip to content

Commit 7415ceb

Browse files
committed
yFiles for HTML 2.5.0.2 demos
1 parent d183034 commit 7415ceb

File tree

881 files changed

+22588
-4551
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

881 files changed

+22588
-4551
lines changed

demos/01-tutorial-getting-started/01-graphcomponent/SampleApplication.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ import { ExteriorLabelModel, GraphComponent, License } from 'yfiles'
3030

3131
import { fetchLicense } from '../../resources/fetch-license.js'
3232

33-
import { enableWorkarounds } from '../../utils/Workarounds.js'
34-
3533
/**
3634
* @returns {!Promise}
3735
*/
@@ -47,6 +45,5 @@ async function run() {
4745
graphComponent.fitGraphBounds()
4846
}
4947

50-
enableWorkarounds()
5148
// noinspection JSIgnoredPromiseFromCall
5249
run()

demos/01-tutorial-getting-started/01-graphcomponent/SampleApplication.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ import { ExteriorLabelModel, GraphComponent, License } from 'yfiles'
3030

3131
import { fetchLicense } from '../../resources/fetch-license'
3232

33-
import { enableWorkarounds } from '../../utils/Workarounds'
34-
3533
async function run(): Promise<void> {
3634
License.value = await fetchLicense()
3735

@@ -44,6 +42,5 @@ async function run(): Promise<void> {
4442
graphComponent.fitGraphBounds()
4543
}
4644

47-
enableWorkarounds()
4845
// noinspection JSIgnoredPromiseFromCall
4946
run()

demos/01-tutorial-getting-started/09-data-binding/SampleApplication.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ import {
5454
ToolTipQueryEventArgs
5555
} from 'yfiles'
5656

57-
import ContextMenu from '../../utils/ContextMenu.js'
57+
import { ContextMenu } from '../../utils/ContextMenu.js'
5858
import { bindCommand, showApp } from '../../resources/demo-app.js'
5959
import { fetchLicense } from '../../resources/fetch-license.js'
6060

demos/01-tutorial-getting-started/09-data-binding/SampleApplication.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ import {
5454
ToolTipQueryEventArgs
5555
} from 'yfiles'
5656

57-
import ContextMenu from '../../utils/ContextMenu'
57+
import { ContextMenu } from '../../utils/ContextMenu'
5858
import { bindCommand, showApp } from '../../resources/demo-app'
5959
import { fetchLicense } from '../../resources/fetch-license'
6060

demos/01-tutorial-getting-started/10-layout/SampleApplication.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ import {
5757
ToolTipQueryEventArgs
5858
} from 'yfiles'
5959

60-
import ContextMenu from '../../utils/ContextMenu.js'
61-
import { bindAction, bindCommand, showApp } from '../../resources/demo-app.js'
60+
import { ContextMenu } from '../../utils/ContextMenu.js'
61+
import { bindAction, bindCommand, reportDemoError, showApp } from '../../resources/demo-app.js'
6262
import GraphBuilderData from './resources/graph.js'
6363
import { fetchLicense } from '../../resources/fetch-license.js'
6464

@@ -140,13 +140,7 @@ async function runLayout() {
140140
easedAnimation: true
141141
})
142142
} catch (error) {
143-
// this is just for the purpose of the demo - usually you would employ your own
144-
// logging or error handling logic, here
145-
if (typeof window.reportError === 'function') {
146-
window.reportError(error)
147-
} else {
148-
throw error
149-
}
143+
reportDemoError(error)
150144
} finally {
151145
layoutButton.disabled = false
152146
}

demos/01-tutorial-getting-started/10-layout/SampleApplication.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ import {
5858
ToolTipQueryEventArgs
5959
} from 'yfiles'
6060

61-
import ContextMenu from '../../utils/ContextMenu'
62-
import { bindAction, bindCommand, showApp } from '../../resources/demo-app'
61+
import { ContextMenu } from '../../utils/ContextMenu'
62+
import { bindAction, bindCommand, reportDemoError, showApp } from '../../resources/demo-app'
6363
import GraphBuilderData from './resources/graph'
6464
import { fetchLicense } from '../../resources/fetch-license'
6565

@@ -137,14 +137,7 @@ async function runLayout(): Promise<void> {
137137
easedAnimation: true
138138
})
139139
} catch (error) {
140-
// this is just for the purpose of the demo - usually you would employ your own
141-
// logging or error handling logic, here
142-
if (typeof (window as any).reportError === 'function') {
143-
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
144-
;(window as any).reportError(error)
145-
} else {
146-
throw error
147-
}
140+
reportDemoError(error)
148141
} finally {
149142
layoutButton.disabled = false
150143
}

demos/01-tutorial-getting-started/11-layout-data/SampleApplication.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ import {
5454
Size
5555
} from 'yfiles'
5656

57-
import { bindAction, bindCommand, showApp } from '../../resources/demo-app.js'
57+
import { bindAction, bindCommand, reportDemoError, showApp } from '../../resources/demo-app.js'
5858
import GraphBuilderData from './resources/graph.js'
5959
import { fetchLicense } from '../../resources/fetch-license.js'
6060

@@ -137,13 +137,7 @@ async function runLayout() {
137137
easedAnimation: true
138138
})
139139
} catch (error) {
140-
// this is just for the purpose of the demo - usually you would employ your own
141-
// logging or error handling logic, here
142-
if (typeof window.reportError === 'function') {
143-
window.reportError(error)
144-
} else {
145-
throw error
146-
}
140+
reportDemoError(error)
147141
} finally {
148142
layoutButton.disabled = false
149143
}

demos/01-tutorial-getting-started/11-layout-data/SampleApplication.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ import {
5555
Size
5656
} from 'yfiles'
5757

58-
import { bindAction, bindCommand, showApp } from '../../resources/demo-app'
58+
import { bindAction, bindCommand, reportDemoError, showApp } from '../../resources/demo-app'
5959
import GraphBuilderData from './resources/graph'
6060
import { fetchLicense } from '../../resources/fetch-license'
6161

@@ -134,14 +134,7 @@ async function runLayout(): Promise<void> {
134134
easedAnimation: true
135135
})
136136
} catch (error) {
137-
// this is just for the purpose of the demo - usually you would employ your own
138-
// logging or error handling logic, here
139-
if (typeof (window as any).reportError === 'function') {
140-
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
141-
;(window as any).reportError(error)
142-
} else {
143-
throw error
144-
}
137+
reportDemoError(error)
145138
} finally {
146139
layoutButton.disabled = false
147140
}

demos/01-tutorial-getting-started/12-graph-analysis/SampleApplication.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ import {
5959
ToolTipQueryEventArgs
6060
} from 'yfiles'
6161

62-
import ContextMenu from '../../utils/ContextMenu.js'
62+
import { ContextMenu } from '../../utils/ContextMenu.js'
6363
import { bindAction, bindCommand, showApp } from '../../resources/demo-app.js'
6464
import GraphBuilderData from './resources/graph.js'
6565
import { fetchLicense } from '../../resources/fetch-license.js'

demos/01-tutorial-getting-started/12-graph-analysis/SampleApplication.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ import {
6060
ToolTipQueryEventArgs
6161
} from 'yfiles'
6262

63-
import ContextMenu from '../../utils/ContextMenu'
63+
import { ContextMenu } from '../../utils/ContextMenu'
6464
import { bindAction, bindCommand, showApp } from '../../resources/demo-app'
6565
import GraphBuilderData from './resources/graph'
6666
import { fetchLicense } from '../../resources/fetch-license'

demos/02-tutorial-custom-styles/01-custom-node-style/MySimpleNodeStyle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import {
4141
* that uses the convenience class {@link NodeStyleBase}
4242
* as the base class.
4343
*/
44-
export default class MySimpleNodeStyle extends NodeStyleBase {
44+
export class MySimpleNodeStyle extends NodeStyleBase {
4545
constructor() {
4646
super()
4747
this.$nodeColor = 'rgba(0,130,180,1)'

demos/02-tutorial-custom-styles/01-custom-node-style/MySimpleNodeStyle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import {
4141
* that uses the convenience class {@link NodeStyleBase}
4242
* as the base class.
4343
*/
44-
export default class MySimpleNodeStyle extends NodeStyleBase {
44+
export class MySimpleNodeStyle extends NodeStyleBase {
4545
private static $fillCounter: number
4646

4747
private $nodeColor: string

demos/02-tutorial-custom-styles/01-custom-node-style/SampleApplication.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
Size
4343
} from 'yfiles'
4444

45-
import MySimpleNodeStyle from './MySimpleNodeStyle.js'
45+
import { MySimpleNodeStyle } from './MySimpleNodeStyle.js'
4646
import { bindCommand, showApp } from '../../resources/demo-app.js'
4747

4848
import { applyDemoTheme } from '../../resources/demo-styles.js'

demos/02-tutorial-custom-styles/01-custom-node-style/SampleApplication.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
Size
4343
} from 'yfiles'
4444

45-
import MySimpleNodeStyle from './MySimpleNodeStyle'
45+
import { MySimpleNodeStyle } from './MySimpleNodeStyle'
4646
import { bindCommand, showApp } from '../../resources/demo-app'
4747

4848
import { applyDemoTheme } from '../../resources/demo-styles'

demos/02-tutorial-custom-styles/02-node-color/MySimpleNodeStyle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
* that uses the convenience class {@link NodeStyleBase}
4343
* as the base class.
4444
*/
45-
export default class MySimpleNodeStyle extends NodeStyleBase {
45+
export class MySimpleNodeStyle extends NodeStyleBase {
4646
constructor() {
4747
super()
4848
this.$nodeColor = 'rgba(0,130,180,1)'

demos/02-tutorial-custom-styles/02-node-color/MySimpleNodeStyle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
* that uses the convenience class {@link NodeStyleBase}
4343
* as the base class.
4444
*/
45-
export default class MySimpleNodeStyle extends NodeStyleBase {
45+
export class MySimpleNodeStyle extends NodeStyleBase {
4646
private static $fillCounter: number
4747

4848
private $nodeColor: string

demos/02-tutorial-custom-styles/02-node-color/SampleApplication.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
Size
4343
} from 'yfiles'
4444

45-
import MySimpleNodeStyle from './MySimpleNodeStyle.js'
45+
import { MySimpleNodeStyle } from './MySimpleNodeStyle.js'
4646
import { bindCommand, showApp } from '../../resources/demo-app.js'
4747

4848
import { applyDemoTheme } from '../../resources/demo-styles.js'

demos/02-tutorial-custom-styles/02-node-color/SampleApplication.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
Size
4343
} from 'yfiles'
4444

45-
import MySimpleNodeStyle from './MySimpleNodeStyle'
45+
import { MySimpleNodeStyle } from './MySimpleNodeStyle'
4646
import { bindCommand, showApp } from '../../resources/demo-app'
4747

4848
import { applyDemoTheme } from '../../resources/demo-styles'

demos/02-tutorial-custom-styles/03-update-visual-and-render-data-cache/MySimpleNodeStyle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import {
4545
* that uses the convenience class {@link NodeStyleBase}
4646
* as the base class.
4747
*/
48-
export default class MySimpleNodeStyle extends NodeStyleBase {
48+
export class MySimpleNodeStyle extends NodeStyleBase {
4949
constructor() {
5050
super()
5151
this.$nodeColor = 'rgba(0,130,180,1)'

demos/02-tutorial-custom-styles/03-update-visual-and-render-data-cache/MySimpleNodeStyle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import {
4646
* that uses the convenience class {@link NodeStyleBase}
4747
* as the base class.
4848
*/
49-
export default class MySimpleNodeStyle extends NodeStyleBase {
49+
export class MySimpleNodeStyle extends NodeStyleBase {
5050
private static $fillCounter: number
5151

5252
private $nodeColor: string

demos/02-tutorial-custom-styles/03-update-visual-and-render-data-cache/SampleApplication.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import {
4545
Size
4646
} from 'yfiles'
4747

48-
import MySimpleNodeStyle from './MySimpleNodeStyle.js'
48+
import { MySimpleNodeStyle } from './MySimpleNodeStyle.js'
4949
import { bindAction, bindCommand, showApp } from '../../resources/demo-app.js'
5050

5151
import { applyDemoTheme } from '../../resources/demo-styles.js'

demos/02-tutorial-custom-styles/03-update-visual-and-render-data-cache/SampleApplication.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import {
4545
Size
4646
} from 'yfiles'
4747

48-
import MySimpleNodeStyle from './MySimpleNodeStyle'
48+
import { MySimpleNodeStyle } from './MySimpleNodeStyle'
4949
import { bindAction, bindCommand, showApp } from '../../resources/demo-app'
5050

5151
import { applyDemoTheme } from '../../resources/demo-styles'

demos/02-tutorial-custom-styles/04-is-inside/MySimpleNodeStyle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import {
4545
* that uses the convenience class {@link NodeStyleBase}
4646
* as the base class.
4747
*/
48-
export default class MySimpleNodeStyle extends NodeStyleBase {
48+
export class MySimpleNodeStyle extends NodeStyleBase {
4949
constructor() {
5050
super()
5151
this.$nodeColor = 'rgba(0,130,180,1)'

demos/02-tutorial-custom-styles/04-is-inside/MySimpleNodeStyle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import {
4646
* that uses the convenience class {@link NodeStyleBase}
4747
* as the base class.
4848
*/
49-
export default class MySimpleNodeStyle extends NodeStyleBase {
49+
export class MySimpleNodeStyle extends NodeStyleBase {
5050
private static $fillCounter: number
5151

5252
private $nodeColor: string

demos/02-tutorial-custom-styles/04-is-inside/SampleApplication.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
Size
4343
} from 'yfiles'
4444

45-
import MySimpleNodeStyle from './MySimpleNodeStyle.js'
45+
import { MySimpleNodeStyle } from './MySimpleNodeStyle.js'
4646
import { bindCommand, showApp } from '../../resources/demo-app.js'
4747

4848
import { applyDemoTheme } from '../../resources/demo-styles.js'

demos/02-tutorial-custom-styles/04-is-inside/SampleApplication.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
Size
4343
} from 'yfiles'
4444

45-
import MySimpleNodeStyle from './MySimpleNodeStyle'
45+
import { MySimpleNodeStyle } from './MySimpleNodeStyle'
4646
import { bindCommand, showApp } from '../../resources/demo-app'
4747

4848
import { applyDemoTheme } from '../../resources/demo-styles'

demos/02-tutorial-custom-styles/05-hit-test/MySimpleNodeStyle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import {
4747
* that uses the convenience class {@link NodeStyleBase}
4848
* as the base class.
4949
*/
50-
export default class MySimpleNodeStyle extends NodeStyleBase {
50+
export class MySimpleNodeStyle extends NodeStyleBase {
5151
constructor() {
5252
super()
5353
this.$nodeColor = 'rgba(0,130,180,1)'

demos/02-tutorial-custom-styles/05-hit-test/MySimpleNodeStyle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import {
4848
* that uses the convenience class {@link NodeStyleBase}
4949
* as the base class.
5050
*/
51-
export default class MySimpleNodeStyle extends NodeStyleBase {
51+
export class MySimpleNodeStyle extends NodeStyleBase {
5252
private static $fillCounter: number
5353

5454
private $nodeColor: string

demos/02-tutorial-custom-styles/05-hit-test/SampleApplication.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
Size
4343
} from 'yfiles'
4444

45-
import MySimpleNodeStyle from './MySimpleNodeStyle.js'
45+
import { MySimpleNodeStyle } from './MySimpleNodeStyle.js'
4646
import { bindCommand, showApp } from '../../resources/demo-app.js'
4747

4848
import { applyDemoTheme } from '../../resources/demo-styles.js'

demos/02-tutorial-custom-styles/05-hit-test/SampleApplication.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
Size
4343
} from 'yfiles'
4444

45-
import MySimpleNodeStyle from './MySimpleNodeStyle'
45+
import { MySimpleNodeStyle } from './MySimpleNodeStyle'
4646
import { bindCommand, showApp } from '../../resources/demo-app'
4747

4848
import { applyDemoTheme } from '../../resources/demo-styles'

demos/02-tutorial-custom-styles/06-get-bounds/MySimpleNodeStyle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import {
4747
* that uses the convenience class {@link NodeStyleBase}
4848
* as the base class.
4949
*/
50-
export default class MySimpleNodeStyle extends NodeStyleBase {
50+
export class MySimpleNodeStyle extends NodeStyleBase {
5151
constructor() {
5252
super()
5353
this.$nodeColor = 'rgba(0,130,180,1)'

demos/02-tutorial-custom-styles/06-get-bounds/MySimpleNodeStyle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import {
4848
* that uses the convenience class {@link NodeStyleBase}
4949
* as the base class.
5050
*/
51-
export default class MySimpleNodeStyle extends NodeStyleBase {
51+
export class MySimpleNodeStyle extends NodeStyleBase {
5252
private static $fillCounter: number
5353

5454
private $nodeColor: string

demos/02-tutorial-custom-styles/06-get-bounds/SampleApplication.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
Size
4343
} from 'yfiles'
4444

45-
import MySimpleNodeStyle from './MySimpleNodeStyle.js'
45+
import { MySimpleNodeStyle } from './MySimpleNodeStyle.js'
4646
import { bindCommand, showApp } from '../../resources/demo-app.js'
4747

4848
import { applyDemoTheme } from '../../resources/demo-styles.js'

demos/02-tutorial-custom-styles/06-get-bounds/SampleApplication.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
Size
4343
} from 'yfiles'
4444

45-
import MySimpleNodeStyle from './MySimpleNodeStyle'
45+
import { MySimpleNodeStyle } from './MySimpleNodeStyle'
4646
import { bindCommand, showApp } from '../../resources/demo-app'
4747

4848
import { applyDemoTheme } from '../../resources/demo-styles'

demos/02-tutorial-custom-styles/07-drop-shadow-performance/MySimpleNodeStyle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ import {
5050
* that uses the convenience class {@link NodeStyleBase}
5151
* as the base class.
5252
*/
53-
export default class MySimpleNodeStyle extends NodeStyleBase {
53+
export class MySimpleNodeStyle extends NodeStyleBase {
5454
constructor() {
5555
super()
5656
this.$nodeColor = 'rgba(0,130,180,1)'

0 commit comments

Comments
 (0)