-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* v0.0.89 * +JIT function support * +DependencyFinder in test * fully show json pointer inference from jit method in test * test++ improve readability? * propagate 'op'- groundwork for supporting function --------- Co-authored-by: Geoffrey Hendrey <[email protected]>
- Loading branch information
1 parent
0136d9f
commit f033642
Showing
5 changed files
with
167 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
svgson: "${$fetch('https://raw.githubusercontent.com/geoffhendrey/jsonataplay/main/animateLines.json').json()}" | ||
data: { | ||
bandwidth: { | ||
data:{ | ||
replica1: 2000, | ||
replica2: 500 | ||
} | ||
} | ||
} | ||
computeDurationOfAnimation: "${function($bandwidth){$string(1000/$bandwidth) & 's' }}" #produces '2s' for instance | ||
setLineAnimationDuration: | | ||
${ | ||
function($svg, $lineId, $duration ){ | ||
$svg ~> |$.[children[name='line' | ||
and | ||
attributes[id=$lineId]] | ||
.children[name='animate']] | ||
.attributes | ||
|{'dur':$duration}| /*sets the svg animate tag's 'dur' attribute like dur="0.5s"*/ | ||
} | ||
} | ||
setBandwidthBoxText: | | ||
${ | ||
function($svg, $id, $bw ){ | ||
$svg ~> |$.children[name='text' and attributes[id=$id]] | ||
.children[type='text'].attributes|{'value':$string($bw)&' Mbps'}| /*sets the text inside the box to like 1000 Mps'*/ | ||
} | ||
} | ||
dur1: "${ computeDurationOfAnimation($$.data.bandwidth.data.replica1)}" | ||
dur2: "${ computeDurationOfAnimation($$.data.bandwidth.data.replica2)}" | ||
content: | | ||
${ | ||
svgson | ||
~> setLineAnimationDuration('line1', $$.dur1) | ||
~> setLineAnimationDuration('line2', $$.dur2) | ||
~> setBandwidthBoxText('text1', $$.data.bandwidth.data.replica1) | ||
~> setBandwidthBoxText('text2', $$.data.bandwidth.data.replica2) | ||
} |
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
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