Skip to content

Improve copying to clipboard from monitor binding fields #651

@alvov-evo

Description

@alvov-evo

Given: a single line monitor field, or multiline monitor field with a bufferSize: 1

When you try to select the text in such monitor field, the selection gets reset on every field controller tick, even if the actual value in the text field has not changed. For bindings that have low interval time it's almost impossible to select the text value.

This can be solved by making SingleLogView and MultiLogView check for a current (string) value before updating it. That way there will be higher chance that selecting the text will be successful. Of course, if the value actually changes, or in case when bufferSize is greater than 1, text selection will still be reset, but I guess that's fair.

Alternative way to solve it would be to make MonitorBindingValue not emit the "change" event in a described case, but I suppose such issue should rather be solved within the "view" component.

Possible workaround without the need to change the code: add "Copy to clipboard" button right after the monitor binding field.

Tweakpane version: 4.0.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions