diff --git a/Project.toml b/Project.toml index 011b89cf..7e0b5fb5 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "PlutoUI" uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8" authors = ["Fons van der Plas "] -version = "0.7.52" +version = "0.7.53" [deps] AbstractPlutoDingetjes = "6e696c72-6542-2067-7265-42206c756150" diff --git a/assets/clock.js b/assets/clock.js index fd868759..9396de0c 100644 --- a/assets/clock.js +++ b/assets/clock.js @@ -7,8 +7,9 @@ const unit = clock.querySelector("span#unit") const button = clock.querySelector("button") const max_value = +clock.dataset.maxValue +const repeat = clock.dataset.repeat === "true" -var t = clock.value = 1 +var t = (clock.value = 1) var starttime = null var dt = 1 @@ -29,16 +30,21 @@ analogfront.onanimationiteration = (e) => { const running_time = (Date.now() - starttime) / 1000 t = Math.max(t + 1, Math.floor(running_time / dt)) if (!isNaN(max_value)) { - t = Math.min(t, max_value) + if (repeat) { + if(t > max_value) { + t = 1 + starttime = Date.now() + } + } else { + if (t >= max_value) { + clock.classList.add("stopped") + t = max_value + } + } } clock.value = t clock.dispatchEvent(new CustomEvent("input")) } - - if (t >= max_value) { - clock.classList.add("stopped") - t = 0 - } } unit.onclick = (e) => { clock.classList.toggle("inverted") @@ -48,6 +54,6 @@ button.onclick = (e) => { starttime = Date.now() clock.classList.toggle("stopped") if (!clock.classList.contains("stopped")) { - t = 1 - 1 + t = 1 } } diff --git a/pluto_export.json b/pluto_export.json index a798da0e..488602ac 100644 --- a/pluto_export.json +++ b/pluto_export.json @@ -1 +1 @@ -{"notebooks":{"src/TableOfContents.jl":{"id":"src/TableOfContents.jl","hash":"1BT1NDaW7DD-n1n76yH3EcL90EcF8NUt-bWxmRticbc","html_path":"src/TableOfContents.html","statefile_path":"src/TableOfContents.plutostate","notebookfile_path":"src/TableOfContents.jl","current_hash":"1BT1NDaW7DD-n1n76yH3EcL90EcF8NUt-bWxmRticbc","desired_hash":"1BT1NDaW7DD-n1n76yH3EcL90EcF8NUt-bWxmRticbc","frontmatter":{"title":"TableOfContents"}},"src/Scrubbable.jl":{"id":"src/Scrubbable.jl","hash":"KRQ9M8fcdkT4bgALBgUaHiOu5MRtsoxweMd1y2EiBF4","html_path":"src/Scrubbable.html","statefile_path":"src/Scrubbable.plutostate","notebookfile_path":"src/Scrubbable.jl","current_hash":"KRQ9M8fcdkT4bgALBgUaHiOu5MRtsoxweMd1y2EiBF4","desired_hash":"KRQ9M8fcdkT4bgALBgUaHiOu5MRtsoxweMd1y2EiBF4","frontmatter":{"title":"Scrubbable"}},"src/RangeSlider.jl":{"id":"src/RangeSlider.jl","hash":"41IQj6SuNGg6oScvXLjMSK_J4322m3skjL-9Hg277TE","html_path":"src/RangeSlider.html","statefile_path":"src/RangeSlider.plutostate","notebookfile_path":"src/RangeSlider.jl","current_hash":"41IQj6SuNGg6oScvXLjMSK_J4322m3skjL-9Hg277TE","desired_hash":"41IQj6SuNGg6oScvXLjMSK_J4322m3skjL-9Hg277TE","frontmatter":{"title":"RangeSlider"}},"src/Combine.jl":{"id":"src/Combine.jl","hash":"iUvZwy_jEKRNqLirUqQyk409XKfVDa2FSdhA-nKjhec","html_path":"src/Combine.html","statefile_path":"src/Combine.plutostate","notebookfile_path":"src/Combine.jl","current_hash":"iUvZwy_jEKRNqLirUqQyk409XKfVDa2FSdhA-nKjhec","desired_hash":"iUvZwy_jEKRNqLirUqQyk409XKfVDa2FSdhA-nKjhec","frontmatter":{"title":"Combine"}},"src/WebcamInput.jl":{"id":"src/WebcamInput.jl","hash":"-i-5w3pSkmIv4eG53-qx2hWOArKmu-YPzVTSkF9qOTY","html_path":"src/WebcamInput.html","statefile_path":"src/WebcamInput.plutostate","notebookfile_path":"src/WebcamInput.jl","current_hash":"-i-5w3pSkmIv4eG53-qx2hWOArKmu-YPzVTSkF9qOTY","desired_hash":"-i-5w3pSkmIv4eG53-qx2hWOArKmu-YPzVTSkF9qOTY","frontmatter":{"title":"WebcamInput"}},"src/Clock.jl":{"id":"src/Clock.jl","hash":"lnP0YARdlUnVL1grKWmuGzEqMGcvR983gTBHNHs4Ego","html_path":"src/Clock.html","statefile_path":"src/Clock.plutostate","notebookfile_path":"src/Clock.jl","current_hash":"lnP0YARdlUnVL1grKWmuGzEqMGcvR983gTBHNHs4Ego","desired_hash":"lnP0YARdlUnVL1grKWmuGzEqMGcvR983gTBHNHs4Ego","frontmatter":{"title":"Clock"}},"src/Builtins.jl":{"id":"src/Builtins.jl","hash":"eESv9gp9ljW8yMrLH2qGfKG0pd3CAZyP4frO8l48rng","html_path":"src/Builtins.html","statefile_path":"src/Builtins.plutostate","notebookfile_path":"src/Builtins.jl","current_hash":"eESv9gp9ljW8yMrLH2qGfKG0pd3CAZyP4frO8l48rng","desired_hash":"eESv9gp9ljW8yMrLH2qGfKG0pd3CAZyP4frO8l48rng","frontmatter":{"title":"Builtins"}},"src/TransformedValue.jl":{"id":"src/TransformedValue.jl","hash":"OfJ4BXH7_xy1IDdIpQSLhuJwws1AvsKrECwhkT5Xxlw","html_path":"src/TransformedValue.html","statefile_path":"src/TransformedValue.plutostate","notebookfile_path":"src/TransformedValue.jl","current_hash":"OfJ4BXH7_xy1IDdIpQSLhuJwws1AvsKrECwhkT5Xxlw","desired_hash":"OfJ4BXH7_xy1IDdIpQSLhuJwws1AvsKrECwhkT5Xxlw","frontmatter":{"title":"TransformedValue"}},"src/Layout.jl":{"id":"src/Layout.jl","hash":"67WMi08M6X6E15b_6QXTDeBl6n6V-4QfidfYVCgY57A","html_path":"src/Layout.html","statefile_path":"src/Layout.plutostate","notebookfile_path":"src/Layout.jl","current_hash":"67WMi08M6X6E15b_6QXTDeBl6n6V-4QfidfYVCgY57A","desired_hash":"67WMi08M6X6E15b_6QXTDeBl6n6V-4QfidfYVCgY57A","frontmatter":{"title":"Layout"}},"src/MultiCheckBox.jl":{"id":"src/MultiCheckBox.jl","hash":"NFFwqMjsWOYeWw08Qh2edO4CF4SNg7CgasoYlY-qlHQ","html_path":"src/MultiCheckBox.html","statefile_path":"src/MultiCheckBox.plutostate","notebookfile_path":"src/MultiCheckBox.jl","current_hash":"NFFwqMjsWOYeWw08Qh2edO4CF4SNg7CgasoYlY-qlHQ","desired_hash":"NFFwqMjsWOYeWw08Qh2edO4CF4SNg7CgasoYlY-qlHQ","frontmatter":{"title":"MultiCheckBox"}},"src/Confirm.jl":{"id":"src/Confirm.jl","hash":"dD9jscUtfaYaL9POrAJksUA8k8IrPRAn6dzPp0glvak","html_path":"src/Confirm.html","statefile_path":"src/Confirm.plutostate","notebookfile_path":"src/Confirm.jl","current_hash":"dD9jscUtfaYaL9POrAJksUA8k8IrPRAn6dzPp0glvak","desired_hash":"dD9jscUtfaYaL9POrAJksUA8k8IrPRAn6dzPp0glvak","frontmatter":{"title":"Confirm"}},"src/TerminalNotebook.jl":{"id":"src/TerminalNotebook.jl","hash":"dSz8XM9ttBM9HyWugq5NCwEtDItdCVsOBNvmN77QKKU","html_path":"src/TerminalNotebook.html","statefile_path":"src/TerminalNotebook.plutostate","notebookfile_path":"src/TerminalNotebook.jl","current_hash":"dSz8XM9ttBM9HyWugq5NCwEtDItdCVsOBNvmN77QKKU","desired_hash":"dSz8XM9ttBM9HyWugq5NCwEtDItdCVsOBNvmN77QKKU","frontmatter":{"title":"TerminalNotebook"}}},"pluto_version":"0.19.27","julia_version":"1.7.3","format_version":"1","title":null,"description":null,"collections":null} \ No newline at end of file +{"notebooks":{"src/TableOfContents.jl":{"id":"src/TableOfContents.jl","hash":"1BT1NDaW7DD-n1n76yH3EcL90EcF8NUt-bWxmRticbc","html_path":"src/TableOfContents.html","statefile_path":"src/TableOfContents.plutostate","notebookfile_path":"src/TableOfContents.jl","current_hash":"1BT1NDaW7DD-n1n76yH3EcL90EcF8NUt-bWxmRticbc","desired_hash":"1BT1NDaW7DD-n1n76yH3EcL90EcF8NUt-bWxmRticbc","frontmatter":{"title":"TableOfContents"}},"src/Scrubbable.jl":{"id":"src/Scrubbable.jl","hash":"KRQ9M8fcdkT4bgALBgUaHiOu5MRtsoxweMd1y2EiBF4","html_path":"src/Scrubbable.html","statefile_path":"src/Scrubbable.plutostate","notebookfile_path":"src/Scrubbable.jl","current_hash":"KRQ9M8fcdkT4bgALBgUaHiOu5MRtsoxweMd1y2EiBF4","desired_hash":"KRQ9M8fcdkT4bgALBgUaHiOu5MRtsoxweMd1y2EiBF4","frontmatter":{"title":"Scrubbable"}},"src/RangeSlider.jl":{"id":"src/RangeSlider.jl","hash":"41IQj6SuNGg6oScvXLjMSK_J4322m3skjL-9Hg277TE","html_path":"src/RangeSlider.html","statefile_path":"src/RangeSlider.plutostate","notebookfile_path":"src/RangeSlider.jl","current_hash":"41IQj6SuNGg6oScvXLjMSK_J4322m3skjL-9Hg277TE","desired_hash":"41IQj6SuNGg6oScvXLjMSK_J4322m3skjL-9Hg277TE","frontmatter":{"title":"RangeSlider"}},"src/Combine.jl":{"id":"src/Combine.jl","hash":"iUvZwy_jEKRNqLirUqQyk409XKfVDa2FSdhA-nKjhec","html_path":"src/Combine.html","statefile_path":"src/Combine.plutostate","notebookfile_path":"src/Combine.jl","current_hash":"iUvZwy_jEKRNqLirUqQyk409XKfVDa2FSdhA-nKjhec","desired_hash":"iUvZwy_jEKRNqLirUqQyk409XKfVDa2FSdhA-nKjhec","frontmatter":{"title":"Combine"}},"src/WebcamInput.jl":{"id":"src/WebcamInput.jl","hash":"-i-5w3pSkmIv4eG53-qx2hWOArKmu-YPzVTSkF9qOTY","html_path":"src/WebcamInput.html","statefile_path":"src/WebcamInput.plutostate","notebookfile_path":"src/WebcamInput.jl","current_hash":"-i-5w3pSkmIv4eG53-qx2hWOArKmu-YPzVTSkF9qOTY","desired_hash":"-i-5w3pSkmIv4eG53-qx2hWOArKmu-YPzVTSkF9qOTY","frontmatter":{"title":"WebcamInput"}},"src/Clock.jl":{"id":"src/Clock.jl","hash":"BTRH7QC_EA0OZrYrLa8yYxbnK0VhQAdoMDHEL4vOIG8","html_path":"src/Clock.html","statefile_path":"src/Clock.plutostate","notebookfile_path":"src/Clock.jl","current_hash":"BTRH7QC_EA0OZrYrLa8yYxbnK0VhQAdoMDHEL4vOIG8","desired_hash":"BTRH7QC_EA0OZrYrLa8yYxbnK0VhQAdoMDHEL4vOIG8","frontmatter":{"title":"Clock"}},"src/Builtins.jl":{"id":"src/Builtins.jl","hash":"eESv9gp9ljW8yMrLH2qGfKG0pd3CAZyP4frO8l48rng","html_path":"src/Builtins.html","statefile_path":"src/Builtins.plutostate","notebookfile_path":"src/Builtins.jl","current_hash":"eESv9gp9ljW8yMrLH2qGfKG0pd3CAZyP4frO8l48rng","desired_hash":"eESv9gp9ljW8yMrLH2qGfKG0pd3CAZyP4frO8l48rng","frontmatter":{"title":"Builtins"}},"src/TransformedValue.jl":{"id":"src/TransformedValue.jl","hash":"OfJ4BXH7_xy1IDdIpQSLhuJwws1AvsKrECwhkT5Xxlw","html_path":"src/TransformedValue.html","statefile_path":"src/TransformedValue.plutostate","notebookfile_path":"src/TransformedValue.jl","current_hash":"OfJ4BXH7_xy1IDdIpQSLhuJwws1AvsKrECwhkT5Xxlw","desired_hash":"OfJ4BXH7_xy1IDdIpQSLhuJwws1AvsKrECwhkT5Xxlw","frontmatter":{"title":"TransformedValue"}},"src/Layout.jl":{"id":"src/Layout.jl","hash":"67WMi08M6X6E15b_6QXTDeBl6n6V-4QfidfYVCgY57A","html_path":"src/Layout.html","statefile_path":"src/Layout.plutostate","notebookfile_path":"src/Layout.jl","current_hash":"67WMi08M6X6E15b_6QXTDeBl6n6V-4QfidfYVCgY57A","desired_hash":"67WMi08M6X6E15b_6QXTDeBl6n6V-4QfidfYVCgY57A","frontmatter":{"title":"Layout"}},"src/MultiCheckBox.jl":{"id":"src/MultiCheckBox.jl","hash":"NFFwqMjsWOYeWw08Qh2edO4CF4SNg7CgasoYlY-qlHQ","html_path":"src/MultiCheckBox.html","statefile_path":"src/MultiCheckBox.plutostate","notebookfile_path":"src/MultiCheckBox.jl","current_hash":"NFFwqMjsWOYeWw08Qh2edO4CF4SNg7CgasoYlY-qlHQ","desired_hash":"NFFwqMjsWOYeWw08Qh2edO4CF4SNg7CgasoYlY-qlHQ","frontmatter":{"title":"MultiCheckBox"}},"src/Confirm.jl":{"id":"src/Confirm.jl","hash":"dD9jscUtfaYaL9POrAJksUA8k8IrPRAn6dzPp0glvak","html_path":"src/Confirm.html","statefile_path":"src/Confirm.plutostate","notebookfile_path":"src/Confirm.jl","current_hash":"dD9jscUtfaYaL9POrAJksUA8k8IrPRAn6dzPp0glvak","desired_hash":"dD9jscUtfaYaL9POrAJksUA8k8IrPRAn6dzPp0glvak","frontmatter":{"title":"Confirm"}},"src/TerminalNotebook.jl":{"id":"src/TerminalNotebook.jl","hash":"dSz8XM9ttBM9HyWugq5NCwEtDItdCVsOBNvmN77QKKU","html_path":"src/TerminalNotebook.html","statefile_path":"src/TerminalNotebook.plutostate","notebookfile_path":"src/TerminalNotebook.jl","current_hash":"dSz8XM9ttBM9HyWugq5NCwEtDItdCVsOBNvmN77QKKU","desired_hash":"dSz8XM9ttBM9HyWugq5NCwEtDItdCVsOBNvmN77QKKU","frontmatter":{"title":"TerminalNotebook"}}},"pluto_version":"0.19.32","julia_version":"1.7.3","format_version":"1","title":null,"description":null,"collections":null,"binder_url":"https://mybinder.org/v2/gh/fonsp/pluto-on-binder/v0.19.32","slider_server_url":null} \ No newline at end of file diff --git a/pluto_state_cache/0_19_27-i-5w3pSkmIv4eG53-qx2hWOArKmu-YPzVTSkF9qOTY.plutostate b/pluto_state_cache/0_19_32-i-5w3pSkmIv4eG53-qx2hWOArKmu-YPzVTSkF9qOTY.plutostate similarity index 86% rename from pluto_state_cache/0_19_27-i-5w3pSkmIv4eG53-qx2hWOArKmu-YPzVTSkF9qOTY.plutostate rename to pluto_state_cache/0_19_32-i-5w3pSkmIv4eG53-qx2hWOArKmu-YPzVTSkF9qOTY.plutostate index 1679e6cb..476a6ba0 100644 Binary files a/pluto_state_cache/0_19_27-i-5w3pSkmIv4eG53-qx2hWOArKmu-YPzVTSkF9qOTY.plutostate and b/pluto_state_cache/0_19_32-i-5w3pSkmIv4eG53-qx2hWOArKmu-YPzVTSkF9qOTY.plutostate differ diff --git a/pluto_state_cache/0_19_271BT1NDaW7DD-n1n76yH3EcL90EcF8NUt-bWxmRticbc.plutostate b/pluto_state_cache/0_19_321BT1NDaW7DD-n1n76yH3EcL90EcF8NUt-bWxmRticbc.plutostate similarity index 95% rename from pluto_state_cache/0_19_271BT1NDaW7DD-n1n76yH3EcL90EcF8NUt-bWxmRticbc.plutostate rename to pluto_state_cache/0_19_321BT1NDaW7DD-n1n76yH3EcL90EcF8NUt-bWxmRticbc.plutostate index 761cc4e7..6e308dba 100644 Binary files a/pluto_state_cache/0_19_271BT1NDaW7DD-n1n76yH3EcL90EcF8NUt-bWxmRticbc.plutostate and b/pluto_state_cache/0_19_321BT1NDaW7DD-n1n76yH3EcL90EcF8NUt-bWxmRticbc.plutostate differ diff --git a/pluto_state_cache/0_19_2741IQj6SuNGg6oScvXLjMSK_J4322m3skjL-9Hg277TE.plutostate b/pluto_state_cache/0_19_3241IQj6SuNGg6oScvXLjMSK_J4322m3skjL-9Hg277TE.plutostate similarity index 87% rename from pluto_state_cache/0_19_2741IQj6SuNGg6oScvXLjMSK_J4322m3skjL-9Hg277TE.plutostate rename to pluto_state_cache/0_19_3241IQj6SuNGg6oScvXLjMSK_J4322m3skjL-9Hg277TE.plutostate index fb9dc9fd..5d2b6504 100644 Binary files a/pluto_state_cache/0_19_2741IQj6SuNGg6oScvXLjMSK_J4322m3skjL-9Hg277TE.plutostate and b/pluto_state_cache/0_19_3241IQj6SuNGg6oScvXLjMSK_J4322m3skjL-9Hg277TE.plutostate differ diff --git a/pluto_state_cache/0_19_2767WMi08M6X6E15b_6QXTDeBl6n6V-4QfidfYVCgY57A.plutostate b/pluto_state_cache/0_19_3267WMi08M6X6E15b_6QXTDeBl6n6V-4QfidfYVCgY57A.plutostate similarity index 57% rename from pluto_state_cache/0_19_2767WMi08M6X6E15b_6QXTDeBl6n6V-4QfidfYVCgY57A.plutostate rename to pluto_state_cache/0_19_3267WMi08M6X6E15b_6QXTDeBl6n6V-4QfidfYVCgY57A.plutostate index 069e5bac..ecd70218 100644 Binary files a/pluto_state_cache/0_19_2767WMi08M6X6E15b_6QXTDeBl6n6V-4QfidfYVCgY57A.plutostate and b/pluto_state_cache/0_19_3267WMi08M6X6E15b_6QXTDeBl6n6V-4QfidfYVCgY57A.plutostate differ diff --git a/pluto_state_cache/0_19_27lnP0YARdlUnVL1grKWmuGzEqMGcvR983gTBHNHs4Ego.plutostate b/pluto_state_cache/0_19_32BTRH7QC_EA0OZrYrLa8yYxbnK0VhQAdoMDHEL4vOIG8.plutostate similarity index 68% rename from pluto_state_cache/0_19_27lnP0YARdlUnVL1grKWmuGzEqMGcvR983gTBHNHs4Ego.plutostate rename to pluto_state_cache/0_19_32BTRH7QC_EA0OZrYrLa8yYxbnK0VhQAdoMDHEL4vOIG8.plutostate index bba244eb..c1260db7 100644 Binary files a/pluto_state_cache/0_19_27lnP0YARdlUnVL1grKWmuGzEqMGcvR983gTBHNHs4Ego.plutostate and b/pluto_state_cache/0_19_32BTRH7QC_EA0OZrYrLa8yYxbnK0VhQAdoMDHEL4vOIG8.plutostate differ diff --git a/pluto_state_cache/0_19_27KRQ9M8fcdkT4bgALBgUaHiOu5MRtsoxweMd1y2EiBF4.plutostate b/pluto_state_cache/0_19_32KRQ9M8fcdkT4bgALBgUaHiOu5MRtsoxweMd1y2EiBF4.plutostate similarity index 97% rename from pluto_state_cache/0_19_27KRQ9M8fcdkT4bgALBgUaHiOu5MRtsoxweMd1y2EiBF4.plutostate rename to pluto_state_cache/0_19_32KRQ9M8fcdkT4bgALBgUaHiOu5MRtsoxweMd1y2EiBF4.plutostate index b781d74e..bc647639 100644 Binary files a/pluto_state_cache/0_19_27KRQ9M8fcdkT4bgALBgUaHiOu5MRtsoxweMd1y2EiBF4.plutostate and b/pluto_state_cache/0_19_32KRQ9M8fcdkT4bgALBgUaHiOu5MRtsoxweMd1y2EiBF4.plutostate differ diff --git a/pluto_state_cache/0_19_27NFFwqMjsWOYeWw08Qh2edO4CF4SNg7CgasoYlY-qlHQ.plutostate b/pluto_state_cache/0_19_32NFFwqMjsWOYeWw08Qh2edO4CF4SNg7CgasoYlY-qlHQ.plutostate similarity index 74% rename from pluto_state_cache/0_19_27NFFwqMjsWOYeWw08Qh2edO4CF4SNg7CgasoYlY-qlHQ.plutostate rename to pluto_state_cache/0_19_32NFFwqMjsWOYeWw08Qh2edO4CF4SNg7CgasoYlY-qlHQ.plutostate index 6a3b9036..136c697b 100644 Binary files a/pluto_state_cache/0_19_27NFFwqMjsWOYeWw08Qh2edO4CF4SNg7CgasoYlY-qlHQ.plutostate and b/pluto_state_cache/0_19_32NFFwqMjsWOYeWw08Qh2edO4CF4SNg7CgasoYlY-qlHQ.plutostate differ diff --git a/pluto_state_cache/0_19_27OfJ4BXH7_xy1IDdIpQSLhuJwws1AvsKrECwhkT5Xxlw.plutostate b/pluto_state_cache/0_19_32OfJ4BXH7_xy1IDdIpQSLhuJwws1AvsKrECwhkT5Xxlw.plutostate similarity index 60% rename from pluto_state_cache/0_19_27OfJ4BXH7_xy1IDdIpQSLhuJwws1AvsKrECwhkT5Xxlw.plutostate rename to pluto_state_cache/0_19_32OfJ4BXH7_xy1IDdIpQSLhuJwws1AvsKrECwhkT5Xxlw.plutostate index 120ceb7b..02d4035d 100644 Binary files a/pluto_state_cache/0_19_27OfJ4BXH7_xy1IDdIpQSLhuJwws1AvsKrECwhkT5Xxlw.plutostate and b/pluto_state_cache/0_19_32OfJ4BXH7_xy1IDdIpQSLhuJwws1AvsKrECwhkT5Xxlw.plutostate differ diff --git a/pluto_state_cache/0_19_27dD9jscUtfaYaL9POrAJksUA8k8IrPRAn6dzPp0glvak.plutostate b/pluto_state_cache/0_19_32dD9jscUtfaYaL9POrAJksUA8k8IrPRAn6dzPp0glvak.plutostate similarity index 70% rename from pluto_state_cache/0_19_27dD9jscUtfaYaL9POrAJksUA8k8IrPRAn6dzPp0glvak.plutostate rename to pluto_state_cache/0_19_32dD9jscUtfaYaL9POrAJksUA8k8IrPRAn6dzPp0glvak.plutostate index 2a8e952b..d93e1485 100644 Binary files a/pluto_state_cache/0_19_27dD9jscUtfaYaL9POrAJksUA8k8IrPRAn6dzPp0glvak.plutostate and b/pluto_state_cache/0_19_32dD9jscUtfaYaL9POrAJksUA8k8IrPRAn6dzPp0glvak.plutostate differ diff --git a/pluto_state_cache/0_19_27dSz8XM9ttBM9HyWugq5NCwEtDItdCVsOBNvmN77QKKU.plutostate b/pluto_state_cache/0_19_32dSz8XM9ttBM9HyWugq5NCwEtDItdCVsOBNvmN77QKKU.plutostate similarity index 88% rename from pluto_state_cache/0_19_27dSz8XM9ttBM9HyWugq5NCwEtDItdCVsOBNvmN77QKKU.plutostate rename to pluto_state_cache/0_19_32dSz8XM9ttBM9HyWugq5NCwEtDItdCVsOBNvmN77QKKU.plutostate index 8648cd6e..3c056370 100644 Binary files a/pluto_state_cache/0_19_27dSz8XM9ttBM9HyWugq5NCwEtDItdCVsOBNvmN77QKKU.plutostate and b/pluto_state_cache/0_19_32dSz8XM9ttBM9HyWugq5NCwEtDItdCVsOBNvmN77QKKU.plutostate differ diff --git a/pluto_state_cache/0_19_27eESv9gp9ljW8yMrLH2qGfKG0pd3CAZyP4frO8l48rng.plutostate b/pluto_state_cache/0_19_32eESv9gp9ljW8yMrLH2qGfKG0pd3CAZyP4frO8l48rng.plutostate similarity index 84% rename from pluto_state_cache/0_19_27eESv9gp9ljW8yMrLH2qGfKG0pd3CAZyP4frO8l48rng.plutostate rename to pluto_state_cache/0_19_32eESv9gp9ljW8yMrLH2qGfKG0pd3CAZyP4frO8l48rng.plutostate index bd896ea5..8cdb24f1 100644 Binary files a/pluto_state_cache/0_19_27eESv9gp9ljW8yMrLH2qGfKG0pd3CAZyP4frO8l48rng.plutostate and b/pluto_state_cache/0_19_32eESv9gp9ljW8yMrLH2qGfKG0pd3CAZyP4frO8l48rng.plutostate differ diff --git a/pluto_state_cache/0_19_27iUvZwy_jEKRNqLirUqQyk409XKfVDa2FSdhA-nKjhec.plutostate b/pluto_state_cache/0_19_32iUvZwy_jEKRNqLirUqQyk409XKfVDa2FSdhA-nKjhec.plutostate similarity index 78% rename from pluto_state_cache/0_19_27iUvZwy_jEKRNqLirUqQyk409XKfVDa2FSdhA-nKjhec.plutostate rename to pluto_state_cache/0_19_32iUvZwy_jEKRNqLirUqQyk409XKfVDa2FSdhA-nKjhec.plutostate index 5371e752..f0674a1c 100644 Binary files a/pluto_state_cache/0_19_27iUvZwy_jEKRNqLirUqQyk409XKfVDa2FSdhA-nKjhec.plutostate and b/pluto_state_cache/0_19_32iUvZwy_jEKRNqLirUqQyk409XKfVDa2FSdhA-nKjhec.plutostate differ diff --git a/src/Builtins.html b/src/Builtins.html index 389e063c..6e4d6c59 100644 --- a/src/Builtins.html +++ b/src/Builtins.html @@ -1,16 +1,16 @@ - -
\ No newline at end of file +
\ No newline at end of file diff --git a/src/Builtins.plutostate b/src/Builtins.plutostate index bd896ea5..8cdb24f1 100644 Binary files a/src/Builtins.plutostate and b/src/Builtins.plutostate differ diff --git a/src/Clock.html b/src/Clock.html index 6700a05c..56b3188b 100644 --- a/src/Clock.html +++ b/src/Clock.html @@ -1,16 +1,16 @@ - -
\ No newline at end of file +
\ No newline at end of file diff --git a/src/Clock.jl b/src/Clock.jl index 02f4ea9b..db1ac1e4 100644 --- a/src/Clock.jl +++ b/src/Clock.jl @@ -1,19 +1,9 @@ ### A Pluto.jl notebook ### -# v0.19.12 +# v0.19.27 using Markdown using InteractiveUtils -# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error). -macro bind(def, element) - quote - local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end - local el = $(esc(element)) - global $(esc(def)) = Core.applicable(Base.get, el) ? Base.get(el) : iv(el) - el - end -end - # ╔═╡ 3689bb1b-23f8-41ae-a392-fb2ee2ec40d7 # ╠═╡ skip_as_script = true #=╠═╡ @@ -24,12 +14,6 @@ begin end ╠═╡ =# -# ╔═╡ e7a070ab-67e7-444b-88d8-87c14aaef046 -# ╠═╡ skip_as_script = true -#=╠═╡ -names(@__MODULE__) - ╠═╡ =# - # ╔═╡ fed9022f-1e8e-4f47-92d8-f99065023d29 import AbstractPlutoDingetjes.Bonds @@ -47,14 +31,15 @@ begin fixed::Bool = false start_running::Bool = false max_value::Union{Int64,Nothing} = nothing + repeat::Bool = false # Clock(interval, fixed, start_running, max_value) = interval >= 0 ? new(interval, fixed, start_running, max_value) : error("interval must be non-negative") end # for backwards compat - Clock(interval; kwargs...) = Clock(interval=interval; kwargs...) + Clock(interval; kwargs...) = Clock(; interval=interval, kwargs...) - Clock(interval, fixed, start_running=false) = Clock(interval, fixed, start_running, nothing) + Clock(interval, fixed, start_running=false, max_value=nothing) = Clock(; interval=interval, fixed=fixed, start_running=start_running, max_value=max_value) # We split the HTML string into multiple files, but you could also write all of this into a single (long) string 🎈 const cb = read(joinpath(@__DIR__, "..", "assets", "clock_back.svg"), String) @@ -67,7 +52,7 @@ begin clock.interval < 0 && error("interval must be non-negative") result = """ - + $(cb) $(cf) @@ -105,6 +90,11 @@ end @bind tick Clock() ╠═╡ =# +# ╔═╡ 4930b73b-14e1-4b1d-8efe-686e31d69070 +#=╠═╡ +tick + ╠═╡ =# + # ╔═╡ 9ecd95f0-d7a5-4ee9-9e18-9d87e5d43ab7 #=╠═╡ tick; rand() @@ -126,6 +116,18 @@ tick fasttick ╠═╡ =# +# ╔═╡ b45005b3-822b-4b72-88ef-3f9fe865de6a +# ╠═╡ skip_as_script = true +#=╠═╡ +@bind loopy Clock(0.5, max_value=4, repeat=true) + ╠═╡ =# + +# ╔═╡ e7a070ab-67e7-444b-88d8-87c14aaef046 +# ╠═╡ skip_as_script = true +#=╠═╡ +loopy + ╠═╡ =# + # ╔═╡ a5f8ed96-136c-4ff4-8275-bd569f0dae40 md""" ## Different constructors @@ -155,6 +157,12 @@ Clock(3.0, true, true) Clock(3.0, true, true, 5) ╠═╡ =# +# ╔═╡ f9f1e6db-d4a6-40dc-908e-51ed5833011c +# ╠═╡ skip_as_script = true +#=╠═╡ +Clock(3.0, true, true, 5, true) + ╠═╡ =# + # ╔═╡ 9115fbcd-1550-4439-a830-c69b83b774b3 # ╠═╡ skip_as_script = true #=╠═╡ @@ -194,10 +202,12 @@ a # ╔═╡ Cell order: # ╠═06289ad2-9e2f-45b3-9d15-7c5a4167e138 +# ╠═4930b73b-14e1-4b1d-8efe-686e31d69070 # ╠═9ecd95f0-d7a5-4ee9-9e18-9d87e5d43ab7 # ╠═d82dae11-b2c6-42b5-8c52-67fbb6cc236a # ╠═80c6e80e-077a-4e31-9467-788a8c437bfc # ╠═63854404-e6a5-4dc6-a40e-b09b9f531465 +# ╠═b45005b3-822b-4b72-88ef-3f9fe865de6a # ╠═e7a070ab-67e7-444b-88d8-87c14aaef046 # ╠═3689bb1b-23f8-41ae-a392-fb2ee2ec40d7 # ╠═fed9022f-1e8e-4f47-92d8-f99065023d29 @@ -208,6 +218,7 @@ a # ╠═83a021ab-7cca-47c7-a560-9cbf58b35ab7 # ╠═c96dfd13-ddd4-443f-ab09-30e15ea76785 # ╠═78ee5465-ce3b-45f6-acec-aa69175807f5 +# ╠═f9f1e6db-d4a6-40dc-908e-51ed5833011c # ╠═9115fbcd-1550-4439-a830-c69b83b774b3 # ╠═f4104cb3-7c07-4814-99f9-a00764ebadf6 # ╠═21cba3fb-7bb0-43ae-b4c4-5c1eb7241fec diff --git a/src/Clock.plutostate b/src/Clock.plutostate index bba244eb..c1260db7 100644 Binary files a/src/Clock.plutostate and b/src/Clock.plutostate differ diff --git a/src/Combine.html b/src/Combine.html index 78572e82..3b5c1c0e 100644 --- a/src/Combine.html +++ b/src/Combine.html @@ -1,16 +1,16 @@ - -
\ No newline at end of file +
\ No newline at end of file diff --git a/src/Combine.plutostate b/src/Combine.plutostate index 5371e752..f0674a1c 100644 Binary files a/src/Combine.plutostate and b/src/Combine.plutostate differ diff --git a/src/Confirm.html b/src/Confirm.html index 8bcf6e98..1a4e48ac 100644 --- a/src/Confirm.html +++ b/src/Confirm.html @@ -1,16 +1,16 @@ - -
\ No newline at end of file +
\ No newline at end of file diff --git a/src/Confirm.plutostate b/src/Confirm.plutostate index 2a8e952b..d93e1485 100644 Binary files a/src/Confirm.plutostate and b/src/Confirm.plutostate differ diff --git a/src/Layout.html b/src/Layout.html index 45730f0d..521daf2a 100644 --- a/src/Layout.html +++ b/src/Layout.html @@ -1,16 +1,16 @@ - -
\ No newline at end of file +
\ No newline at end of file diff --git a/src/Layout.plutostate b/src/Layout.plutostate index 069e5bac..ecd70218 100644 Binary files a/src/Layout.plutostate and b/src/Layout.plutostate differ diff --git a/src/MultiCheckBox.html b/src/MultiCheckBox.html index 79efd773..8e845de4 100644 --- a/src/MultiCheckBox.html +++ b/src/MultiCheckBox.html @@ -1,16 +1,16 @@ - -
\ No newline at end of file +
\ No newline at end of file diff --git a/src/MultiCheckBox.plutostate b/src/MultiCheckBox.plutostate index 6a3b9036..136c697b 100644 Binary files a/src/MultiCheckBox.plutostate and b/src/MultiCheckBox.plutostate differ diff --git a/src/RangeSlider.html b/src/RangeSlider.html index d53e05e3..1d51a47a 100644 --- a/src/RangeSlider.html +++ b/src/RangeSlider.html @@ -1,16 +1,16 @@ - -
\ No newline at end of file +
\ No newline at end of file diff --git a/src/RangeSlider.plutostate b/src/RangeSlider.plutostate index fb9dc9fd..5d2b6504 100644 Binary files a/src/RangeSlider.plutostate and b/src/RangeSlider.plutostate differ diff --git a/src/Scrubbable.html b/src/Scrubbable.html index 28201ccc..5c907340 100644 --- a/src/Scrubbable.html +++ b/src/Scrubbable.html @@ -1,16 +1,16 @@ - -
\ No newline at end of file +
\ No newline at end of file diff --git a/src/Scrubbable.plutostate b/src/Scrubbable.plutostate index b781d74e..bc647639 100644 Binary files a/src/Scrubbable.plutostate and b/src/Scrubbable.plutostate differ diff --git a/src/TableOfContents.html b/src/TableOfContents.html index d5814282..f5bc1bcc 100644 --- a/src/TableOfContents.html +++ b/src/TableOfContents.html @@ -1,16 +1,16 @@ - -
\ No newline at end of file +
\ No newline at end of file diff --git a/src/TableOfContents.plutostate b/src/TableOfContents.plutostate index 761cc4e7..6e308dba 100644 Binary files a/src/TableOfContents.plutostate and b/src/TableOfContents.plutostate differ diff --git a/src/TerminalNotebook.html b/src/TerminalNotebook.html index a0cae182..b9a36e1e 100644 --- a/src/TerminalNotebook.html +++ b/src/TerminalNotebook.html @@ -1,16 +1,16 @@ - -
\ No newline at end of file +
\ No newline at end of file diff --git a/src/TerminalNotebook.plutostate b/src/TerminalNotebook.plutostate index 8648cd6e..3c056370 100644 Binary files a/src/TerminalNotebook.plutostate and b/src/TerminalNotebook.plutostate differ diff --git a/src/TransformedValue.html b/src/TransformedValue.html index 5ae2c205..073698be 100644 --- a/src/TransformedValue.html +++ b/src/TransformedValue.html @@ -1,16 +1,16 @@ - -
\ No newline at end of file +
\ No newline at end of file diff --git a/src/TransformedValue.plutostate b/src/TransformedValue.plutostate index 120ceb7b..02d4035d 100644 Binary files a/src/TransformedValue.plutostate and b/src/TransformedValue.plutostate differ diff --git a/src/WebcamInput.html b/src/WebcamInput.html index ca669c8d..a28bab9f 100644 --- a/src/WebcamInput.html +++ b/src/WebcamInput.html @@ -1,16 +1,16 @@ - -
\ No newline at end of file +
\ No newline at end of file diff --git a/src/WebcamInput.plutostate b/src/WebcamInput.plutostate index 1679e6cb..476a6ba0 100644 Binary files a/src/WebcamInput.plutostate and b/src/WebcamInput.plutostate differ