How to use the elm.ActionSlider function in elm

To help you get started, we’ve selected a few elm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kakaroto / e17 / PROTO / elev8 / data / javascript / actionslider.js View on Github external
slider: "right",
                }),
                snooze_middle: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    labels: { left: "Snooze", right: "Stop" },
                    magnet: "center",
                    slider: "center",
                }),
                accept_reject_middle: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    labels: { center: "Accept", right: "Reject" },
                    magnet: "center",
                }),
                left_right_left: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    label: "Go",
                    labels: { center: "Accept", right: "Reject" },
                    on_select: select_cb,
                }),
                left_right_center: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    label: "Go",
                    labels: { left: "Left", center: "Center", right: "Right" },
                }),
                enable_disable_center: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    labels: { left: "Left", center: "Center", right: "Right" },
github kakaroto / e17 / PROTO / elev8 / data / javascript / actionslider.js View on Github external
the_background: elm.Background({
            weight: EXPAND_BOTH,
            resize: true,
        }),
        the_box: elm.Box({
            weight: { x: 1.0, y: 0.0 },
            resize: true,
            elements: {
                snooze_right: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    labels: { left: "Snooze", right: "Stop" },
                    magnet: "right",
                    slider: "right",
                }),
                snooze_middle: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    labels: { left: "Snooze", right: "Stop" },
                    magnet: "center",
                    slider: "center",
                }),
                accept_reject_middle: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    labels: { center: "Accept", right: "Reject" },
                    magnet: "center",
                }),
                left_right_left: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    label: "Go",
github kakaroto / e17 / PROTO / elev8 / data / javascript / actionslider.js View on Github external
magnet: "center",
                }),
                left_right_left: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    label: "Go",
                    labels: { center: "Accept", right: "Reject" },
                    on_select: select_cb,
                }),
                left_right_center: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    label: "Go",
                    labels: { left: "Left", center: "Center", right: "Right" },
                }),
                enable_disable_center: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    labels: { left: "Left", center: "Center", right: "Right" },
                    magnet: "center",
                    slider: "center",
                }),
            },
        }),
    },
});

var e = elm.realise(w);
github kakaroto / e17 / PROTO / elev8 / data / javascript / actionslider.js View on Github external
elements: {
                snooze_right: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    labels: { left: "Snooze", right: "Stop" },
                    magnet: "right",
                    slider: "right",
                }),
                snooze_middle: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    labels: { left: "Snooze", right: "Stop" },
                    magnet: "center",
                    slider: "center",
                }),
                accept_reject_middle: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    labels: { center: "Accept", right: "Reject" },
                    magnet: "center",
                }),
                left_right_left: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    label: "Go",
                    labels: { center: "Accept", right: "Reject" },
                    on_select: select_cb,
                }),
                left_right_center: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    label: "Go",
github kakaroto / e17 / PROTO / elev8 / data / javascript / actionslider.js View on Github external
}

var w = elm.Window({
    title: "ActionSlider example",
    width: 320,
    height: 480,
    elements: {
        the_background: elm.Background({
            weight: EXPAND_BOTH,
            resize: true,
        }),
        the_box: elm.Box({
            weight: { x: 1.0, y: 0.0 },
            resize: true,
            elements: {
                snooze_right: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    labels: { left: "Snooze", right: "Stop" },
                    magnet: "right",
                    slider: "right",
                }),
                snooze_middle: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    labels: { left: "Snooze", right: "Stop" },
                    magnet: "center",
                    slider: "center",
                }),
                accept_reject_middle: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
github kakaroto / e17 / PROTO / elev8 / data / javascript / actionslider.js View on Github external
slider: "center",
                }),
                accept_reject_middle: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    labels: { center: "Accept", right: "Reject" },
                    magnet: "center",
                }),
                left_right_left: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    label: "Go",
                    labels: { center: "Accept", right: "Reject" },
                    on_select: select_cb,
                }),
                left_right_center: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    label: "Go",
                    labels: { left: "Left", center: "Center", right: "Right" },
                }),
                enable_disable_center: elm.ActionSlider({
                    weight: { x: 1.0, y: 0.0 },
                    align: { x: -1.0, y: 0.0 },
                    labels: { left: "Left", center: "Center", right: "Right" },
                    magnet: "center",
                    slider: "center",
                }),
            },
        }),
    },
});