Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Memri
Browser application
Commits
bab080cb
Commit
bab080cb
authored
4 years ago
by
Amirjanyan
Browse files
Options
Download
Email Patches
Plain Diff
renderConfig bugs fixed
parent
5d5b84b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
memri/cvu/views/CascadableView.ts
+2
-2
memri/cvu/views/CascadableView.ts
memri/parsers/cvu-parser/CVUParsedDefinition.ts
+2
-2
memri/parsers/cvu-parser/CVUParsedDefinition.ts
with
4 additions
and
4 deletions
+4
-4
memri/cvu/views/CascadableView.ts
+
2
-
2
View file @
bab080cb
...
...
@@ -240,14 +240,14 @@ export class CascadableView extends Cascadable/*, ObservableObject*/ {
get
renderConfig
():
CascadingRenderConfig
{
let
x
=
this
.
localCache
[
this
.
activeRenderer
]
if
(
x
?.
constructor
?.
name
==
"
CascadingRenderConfig
"
)
{
return
x
}
if
(
x
&&
x
instanceof
CascadingRenderConfig
)
{
return
x
}
let
getConfig
=
function
(
a
:
CVUParsedDefinition
)
{
let
definitions
=
(
a
.
get
(
"
rendererDefinitions
"
)
??
[])
// Prefer a perfectly matched definition
return
definitions
.
find
((
item
)
=>
item
.
name
==
this
.
activeRenderer
)
// Else get the one from the parent renderer
??
definitions
.
find
((
item
)
=>
item
.
name
==
this
.
activeRenderer
.
split
(
"
.
"
).
s
p
lice
(
-
1
,
1
).
join
(
"
.
"
))
??
definitions
.
find
((
item
)
=>
item
.
name
==
this
.
activeRenderer
.
split
(
"
.
"
).
slice
(
0
,
-
1
).
join
(
"
.
"
))
}.
bind
(
this
)
let
head
=
getConfig
(
this
.
head
)
??
function
(){
...
...
This diff is collapsed.
Click to expand it.
memri/parsers/cvu-parser/CVUParsedDefinition.ts
+
2
-
2
View file @
bab080cb
...
...
@@ -24,7 +24,7 @@ export class CVUParsedDefinition {
this
.
selector
=
selector
this
.
name
=
name
this
.
domain
=
domain
;
this
.
parsed
=
parsed
this
.
parsed
=
parsed
??
new
MemriDictionary
()
}
get
(
propName
:
string
)
{
...
...
@@ -201,7 +201,7 @@ export class CVUParsedViewDefinition extends CVUParsedDefinition {
query
?:
ExprNode
get
definitionType
()
{
return
"
view
"
}
constructor
(
selector
,
name
,
type
?,
query
?,
domain
:
string
=
"
user
"
,
parsed
?:
MemriDictionary
)
{
//TODO
constructor
(
selector
,
name
?
,
type
?,
query
?,
domain
:
string
=
"
user
"
,
parsed
?:
MemriDictionary
)
{
//TODO
super
(
selector
,
name
,
domain
,
parsed
)
this
.
type
=
type
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment