{{ store.width }} x {{ store.height }}

Widget: Mouse Indicator

{{ item.title }}

{{ definition.value }}

A "widget" presents the values in a small div indicator, connected to the widget through a standard (Vue) reactive integration:

Add a widget:

addWidget('example', {
    fields: {
        x: { value: 0 }
        , y: { value: 0 }
    }
})

Update the widget with values:

updateWidgetValues('diff', {
    x: 10
    , y: -20
})

Raw example of updating the values within the widget:

appShared.widgetsApp.widgets.example.fields.x = 100

Therefore to create a basic mouse widget:

let widgetFields = appShared.widgetsApp.widgets.example.fields

let pos = this.mouse.position
widgetFields.x.value = ~~pos.x
widgetFields.y.value = ~~pos.y

This is identical to the updateWidgetValues call

Meta Data
title Widget: Mouse Indicator
imports ()
files ('head', 'point', 'mouse', 'stage', 'fps', '../point_src/smooth-number.js')
unused_keys ()
unknown_keys ('tags',)
tags ['widget']
filepath_exists True
path mouse-indicator
filepath mouse-indicator.js
clean_files ('../point_src/core/head.js', '../point_src/pointpen.js', '../point_src/compass.js', '../point_src/center.js', '../point_src/point-content.js', '../point_src/pointdraw.js', '../point_src/relative-xy.js', '../point_src/pointcast.js', '../point_src/point.js', '../point_src/events.js', '../point_src/automouse.js', '../point_src/stage-resize.js', '../point_src/functions/resolve.js', '../point_src/stage.js', '../point_src/stage-clock.js', '../point_src/text/alpha.js', '../point_src/smooth-number.js', '../point_src/text/fps.js')
Logger Install Logger {{ store.words }}
{{ store.errorText.message }}
{{ store.errorText.stackText }}