-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added communication between tabs (#25)
* added data propagation between tabs * added highlight from reg. tab to func
- Loading branch information
1 parent
aa18977
commit 08c3a7b
Showing
16 changed files
with
256 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@import "uikit/src/less/uikit.theme.less"; | ||
|
||
.function-list { | ||
height: 90%; | ||
overflow: auto; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { html, css, unsafeCSS, LitElement, type TemplateResult } from 'lit' | ||
import { customElement, property, state } from 'lit/decorators.js' | ||
import style_less from './functions-editor.less?inline' | ||
import { map } from 'lit/directives/map.js' | ||
import { ContentData } from '../../util/tab-data' | ||
|
||
@customElement('functions-editor') | ||
class FunctionsEditor extends LitElement { | ||
static styles = css`${unsafeCSS(style_less)}` | ||
@property() contentData: ContentData = ContentData.create() | ||
@state() focusedFunctionId = '' | ||
|
||
constructor () { | ||
super() | ||
this.addEventListener('focus-function', this.focusedFunction) | ||
} | ||
|
||
private focusedFunction (event: Event): void { | ||
this.focusedFunctionId = (event as CustomEvent).detail.nodeId | ||
} | ||
|
||
protected render (): TemplateResult { | ||
return html` | ||
<ul class="function-list uk-list uk-list-divider uk-text-center"> | ||
${map(this.contentData?.nodes, (node) => html` | ||
<li class="${node.id === this.focusedFunctionId ? 'uk-background-primary' : ''} uk-margin-remove-top uk-padding-small"> | ||
${node.id} / ${node.name} | ||
</li> | ||
`)} | ||
</ul> | ||
` | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { type Position } from 'cytoscape' | ||
import { type Monotonicity } from './element-type' | ||
|
||
export interface INodeData { | ||
id: string | ||
name: string | ||
position: Position | ||
} | ||
|
||
export interface IEdgeData { | ||
id: string | ||
source: string | ||
target: string | ||
observable: boolean | ||
monotonicity: Monotonicity | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.