-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'gh-pages' of https://github.com/LivelyKernel/lively4-core…
… into gh-pages
- Loading branch information
Showing
12 changed files
with
172 additions
and
17 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,45 @@ | ||
# Implicit Layer Activation in ContextJS: A Toy Example #Bug | ||
|
||
<script> | ||
import {autoRunSnippet} from "src/client/essay.js"; | ||
autoRunSnippet(this, ".testScript") | ||
</script> | ||
|
||
```JavaScript {.testScript} | ||
import * as cop from "src/client/ContextJS/src/contextjs.js"; | ||
|
||
let bool = false | ||
|
||
let l = cop.layer().refineObject({}, { | ||
|
||
// focus(...args) { | ||
// lively.showElement(this) | ||
// console.log("focus " + this, lively.stack()) | ||
// return cop.proceed(...args) | ||
// } | ||
|
||
}) | ||
|
||
|
||
l.activeWhile(() => bool, aexpr) | ||
l.onActivate(() => { | ||
Object.assign(toggleButton.style, { | ||
background: 'linear-gradient(#dc5f59, #b33630)', | ||
color: 'white' | ||
}) | ||
}) | ||
l.onDeactivate(() => { | ||
Object.assign(toggleButton.style, { | ||
background: 'linear-gradient(#00dd00, #00a000)', | ||
color: 'white' | ||
}) | ||
}) | ||
|
||
const toggleButton = <button click={evt => bool = !bool}>Toggle</button> | ||
|
||
const group = <div> | ||
Toggle layer: {toggleButton} | ||
</div>; | ||
|
||
group | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 55 additions & 0 deletions
55
src/components/widgets/cards-example/example-all-cards.json
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,55 @@ | ||
[ | ||
{ | ||
"versions": [ | ||
{ | ||
"name": "Blob", | ||
"type": "gadget", | ||
"cost": 2, | ||
"text": "Tap: Create a copy of this.", | ||
"baseVP": 1, | ||
"element": "water", | ||
"tags": [ | ||
"basic" | ||
] | ||
} | ||
], | ||
"id": 1, | ||
"identity": "most basic vp card", | ||
"$class": "Card" | ||
}, | ||
{ | ||
"versions": [ | ||
{ | ||
"name": "Harpy", | ||
"type": "gadget", | ||
"tags": [ | ||
"basic" | ||
], | ||
"text": "Flying\n!!Tap a creature.!!", | ||
"element": "wind", | ||
"cost": 3, | ||
"baseVP": 2 | ||
} | ||
], | ||
"id": 2, | ||
"$class": "Card" | ||
}, | ||
{ | ||
"versions": [ | ||
{ | ||
"name": "Fireball", | ||
"type": "spell", | ||
"element": "fire", | ||
"cost": 2, | ||
"text": "Magical\n!! Deal 2 damage. !!", | ||
"baseVP": 5, | ||
"tags": [ | ||
"basic" | ||
], | ||
"rating": "to test" | ||
} | ||
], | ||
"id": 3, | ||
"$class": "Card" | ||
} | ||
] |
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