ImageCropper::make('coordinates')
->image(fn (CreateMapping $livewire) => Storage::disk('public')->url($livewire->getMapType()->preview))
->columnSpan(3)
->default('0, 0, 0, 0')
->afterStateUpdated(function(Set $set, string $state)
{
[$x, $y, $width, $height] = explode(', ',$state);
$set('x', $x);
$set('y', $y);
$set('width', $width);
$set('height', $height);
})
->live()
ImageCropper::make('coordinates')
->image(fn (CreateMapping $livewire) => Storage::disk('public')->url($livewire->getMapType()->preview))
->columnSpan(3)
->default('0, 0, 0, 0')
->afterStateUpdated(function(Set $set, string $state)
{
[$x, $y, $width, $height] = explode(', ',$state);
$set('x', $x);
$set('y', $y);
$set('width', $width);
$set('height', $height);
})
->live()