Skip to content
This repository was archived by the owner on Feb 14, 2023. It is now read-only.
This repository was archived by the owner on Feb 14, 2023. It is now read-only.

[Props]: Add mock-draw #17

Description

@DrSensor

Similiar to draw prop but it only mock (only do the drawing animation), doesn't create the annotation. (doesn't clone-append to <g>...</g> when @drawFinish)
Useful if you want to control how the annotation is created.

In my case the creation depends on query result from ApolloQuery component)

Usage

<v-annotator mock-draw>

  <template v-for="({x, y, w, h, shape}, index) in onQueryUpdate(dataFromSlotScope)">

    <rect v-if="shape === 'rect'" :x="x" :y="y" :width="w" :height="h" :key="index" />
    <circle v-else-if="shape === 'circle'" :cx="x" :cy="y" :r="(w+h)/2" :key="index" />

  </template>

  <rect slot="drawing" />
</v-annotator>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions