-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
269 additions
and
315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
--- | ||
Name: focuspoint | ||
After: 'framework/*','cms/*' | ||
After: | ||
- 'assetsimage' | ||
--- | ||
Image: | ||
SilverStripe\Assets\Image: | ||
extensions: | ||
- FocusPointImage | ||
|
||
# FocusPointField: | ||
# debug: true | ||
# max_width: 500 | ||
# max_height: 300 | ||
|
||
# Injector: | ||
# Image: | ||
# class: FPImage | ||
# Image_Cached: | ||
# class: FPImage_Cached | ||
# ImagickBackend: | ||
# class: "FPImagickBackend" | ||
- JonoM\FocusPoint\FocusPointImageExtension | ||
SilverStripe\Assets\Storage\DBFile: | ||
extensions: | ||
- JonoM\FocusPoint\FocusPointImageExtension | ||
SilverStripe\AssetAdmin\Forms\AssetFormFactory: | ||
extensions: | ||
- JonoM\FocusPoint\FocusPointAssetFormFactoryExtension | ||
SilverStripe\Admin\LeftAndMain: | ||
extra_requirements_css: | ||
- 'jonom/focuspoint: client/css/FocusPointField.css' | ||
extra_requirements_javascript: | ||
- 'jonom/focuspoint: client/javascript/FocusPointField.js' | ||
# SilverStripe\Core\Injector\Injector: | ||
# SilverStripe\Assets\Image_Backend: | ||
# class: JonoM\FocusPoint\InterventionBackend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Ch-ch-ch-ch-Changes | ||
|
||
> 🎶 Turn and face the strange 🎶 | ||
## 3.0 | ||
|
||
* Injector support was removed as it was buggy. You'll have to use the FocusPoint method names for now instead of SilverStripe's built in cropping methods. :( | ||
* `flush_on_change` config option was removed as their is no longer a public API for removing resampled images. | ||
|
||
## 2.0 | ||
|
||
* `FocusPointField` was refactored for 2.x. If you're using the class in your own code you will need to update it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,29 @@ | ||
{ | ||
"name": "jonom/focuspoint", | ||
"type": "silverstripe-vendormodule", | ||
"description": "Smarter automatic image cropping for SilverStripe", | ||
"type": "silverstripe-module", | ||
"keywords": ["silverstripe", "crop", "cropping", "focus", "focuspoint", "image"], | ||
"license": "MIT", | ||
"authors": [{ | ||
"name": "Jonathon Menz", | ||
"homepage": "http://jonathonmenz.com" | ||
}], | ||
"require": { | ||
"silverstripe/framework": "^3.6" | ||
} | ||
"silverstripe/vendor-plugin": "^1.0", | ||
"silverstripe/framework": "^4.0" | ||
}, | ||
"extra": { | ||
"expose": [ | ||
"client" | ||
], | ||
"branch-alias": { | ||
"dev-master": "3.x-dev" | ||
} | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"JonoM\\FocusPoint\\": "src/", | ||
"JonoM\\FocusPoint\\Tests\\": "tests/" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,7 @@ | ||
# Installation | ||
|
||
### Composer (best practice) | ||
|
||
``` | ||
composer require jonom/focuspoint | ||
``` | ||
|
||
See the [packagist listing](https://packagist.org/packages/jonom/focuspoint) and [installation instructions](https://docs.silverstripe.org/en/getting_started/composer/#adding-modules-to-your-project) | ||
|
||
### Manually | ||
|
||
I promise it's worth your time to learn how to use Composer. If painless updating isn't your thing though you can download and extract this project, rename the module folder 'focuspoint', place it in your project root and run a dev/build?flush=1. | ||
|
||
|
||
### Using Focus Point with ImageMagick | ||
|
||
If you are using the ImageMagick you must use [injector](https://docs.silverstripe.org/en/developer_guides/extending/injector/) to replace the ImagickBackend with the wrapper FPImagickBackend for compatibility using the below: | ||
```yml | ||
Injector: | ||
ImagickBackend: | ||
class: "FPImagickBackend" | ||
``` | ||
See the [packagist listing](https://packagist.org/packages/jonom/focuspoint) and [installation instructions](https://docs.silverstripe.org/en/getting_started/composer/#adding-modules-to-your-project) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
en: | ||
FocusPointField: | ||
FOCUSPOINT: 'Focus Point' | ||
JonoM\FocusPoint\FocusPointField: | ||
FOCUSPOINT: 'Focus Point' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
hr: | ||
FocusPointField: | ||
FOCUSPOINT: 'Točka fokusa' | ||
JonoM\FocusPoint\FocusPointField: | ||
FOCUSPOINT: 'Točka fokusa' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
it: | ||
FocusPointField: | ||
JonoM\FocusPoint\FocusPointField: | ||
FOCUSPOINT: 'Punto Focale' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
sr@latin: | ||
FocusPointField: | ||
FOCUSPOINT: 'Tačka fokusa' | ||
JonoM\FocusPoint\FocusPointField: | ||
FOCUSPOINT: 'Tačka fokusa' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
sr_RS@latin: | ||
FocusPointField: | ||
FOCUSPOINT: 'Tačka fokusa' | ||
JonoM\FocusPoint\FocusPointField: | ||
FOCUSPOINT: 'Tačka fokusa' |
Oops, something went wrong.