Работая над вялотекущим проектом под Drupal 7, понадобилось мне показывать масштабируемые превьюхи. Поиск дал несколько результатов, но под D7 был выбран, более менее приемлемый модуль Cloud zoom, основанный на одноименном jQuery плагине jQuery Cloud zoom.
Но к сожалению автор модуля , использовал возможности jQuery плагина лишь на 10%, а точнее через данный модуль практически невозможно настроить плагин, а там, тем не менее достаточно много такого, с чем можно «поиграться»(приведу спецификацию параметров без перевода, кому надо надеюсь сами переведут).
| Parameter | Description (from V1.0.0) | Default Value |
|---|---|---|
| zoomWidth | The width of the zoom window in pixels. If ‘auto’ is specified, the width will be the same as the small image. | ‘auto’ |
| zoomHeight | The height of the zoom window in pixels. If ‘auto’ is specified, the height will be the same as the small image. | ‘auto’ |
| position | Specifies the position of the zoom window relative to the small image. Allowable values are ‘left’, ‘right’, ‘top’, ‘bottom’, ‘inside’ or you can specifiy the id of an html element to place the zoom window in e.g. position: ‘element1′ | ‘right’ |
| adjustX | Allows you to fine tune the x-position of the zoom window in pixels. | 0 |
| adjustY | Allows you to fine tune the y-position of the zoom window in pixels. | 0 |
| tint | Specifies a tint colour which will cover the small image. Colours should be specified in hex format, e.g. ‘#aa00aa’. Does not work with softFocus. | false |
| tintOpacity | Opacity of the tint, where 0 is fully transparent, and 1 is fully opaque. | 0.5 |
| lensOpacity | Opacity of the lens mouse pointer, where 0 is fully transparent, and 1 is fully opaque. In tint and soft-focus modes, it will always be transparent. | 0.5 |
| softFocus | Applies a subtle blur effect to the small image. Set to true or false. Does not work with tint. | false |
| smoothMove | Amount of smoothness/drift of the zoom image as it moves. The higher the number, the smoother/more drifty the movement will be. 1 = no smoothing. | 3 |
| showTitle | Shows the title tag of the image. True or false. | true |
| titleOpacity | Specifies the opacity of the title if displayed, where 0 is fully transparent, and 1 is fully opaque. | 0.5 |
Решил таки исправить данную ситуацию и написал модуль интегрирующий тот же самый jQuery плагин, но позволяющий гибко настроить все используемые параметры.
Примеры работы модуля можно посмотреть на моей тестовой площадке.
Сам модуль можно взять здесь (см. прикрепленные файлы) …
Модуль в пре-дев версии, только для тестирования … если кого заинтересует, то будет время доведу до ума и выложу на д.о.
Устанавливается стандартно, т.е. распаковываете архив в папку sites/all/modules
забираете с сайта jQuery Cloud zoom скрипты и распаковываете их в папку sites/all/libraries/cloud-zoom
Включаете модуль.
Настраиваете тип материала (поле типа Изображение (Image) на закладке “Отображение” устанавливает формат – cczoom и далее уже настраиваете параметры вывода)
Скриншоты настройки поля:


Источник: http://www.drupal.ru/node/62581
Добавить комментарий к записи "Модуль cczoom как альтернатива cloud zoom"
Чтобы комментировать, необходимо войти в систему.