ruelluna / canvas-pointer

A Filament field that allows users to click and point markers on an image.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A Filament field that allows users to click and point to mark references on an image.

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

I have used it for a client that needs visual reprensentations to where the pains are located in the body. What is your use case? This field will produce a base-64 image. If you're saving this to your table, I recommend making a BLOB column or convert it to an actual image file.

Installation

You can install the package via composer:

composer require ruelluna/canvas-pointer

Usage

CanvasPointerField::make('body-points')
    ->pointRadius(15) // default is 5
    ->imageUrl('your image source')
    ->width(800) // required
    ->height(800) // required
    ->label('Select body parts that are in pain'),

Todos

  • Automatically detect height and width
  • Table Column Component
  • Entry Component
  • npm Konva dependency

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

A Filament field that allows users to click and point markers on an image.

License:MIT License


Languages

Language:PHP 68.5%Language:Blade 28.2%Language:JavaScript 3.3%