Skip to content

Ivan753/carusel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

carusel

Этот плагин предназначен для реализации "карусели" на сайте.



Для работы плагина создаются глобальные массивы carusels и carusels_timersID . В первом хранятся ссылки на объекты - "карусели" на стренице, в втором - id таймеров setInterval() для работы плагина.
В объекте carusels[n], где n - номер очередной "карусели" на странице, хранятся все свойства и методы, необходимые для его работы:
  • width: ширина блока, в котором хрянтся элементы - "карусели";
  • height: соответствующая высота;
  • num: количество элемнтов "карусели";
  • radiusX: радиус движения по оси Х;
  • radiusY: радиус движения по оси Y;
  • step: шаг, с которым будут располагаться элементы на окружности;
  • angl: начальный угол;
  • angl_road: "добавочный" угол;
  • members: ссылки на все элементы "карусели";
  • draw: метод, рассчитывающий положение элементов;
  • change: логическая переменная, отвечающая за разрешение изменения положения элементов;
  • counter_start: начальное положение счетчика;
  • counter_end: конечное положение счетчика;
  • change_step: шаг, с которым будут передвигаться элементы по окружности;
  • nonstop: логическая переменная, отвечающая за разрешение передвигать элементы независимо от началього и конечного положения счетчиков;
  • carusels_right: метод, передвигающий все элементы вправо на определённый шаг;
  • carusels_left: метод, передвигающий все элементы влево на определённый шаг;
  • carusels_nonstop: метод, запускающий "карусель";
  • carusels_stop: метод, останавливаюзий "карусель";
Обратите внимание: первые 8 свойств можно задать вручную, как будет нужно. В противном случае значения этих свойств рассчитается автоматически. Контактный электронный адрес: ivan-753s@mail.ru .

In English


This plugin is designed to implement the "carousel" on the site.


For the operation of the plugin, global arrays carusels and carusels_timersID are created. The first one contains references to objects - "carousels" on the page, in the second - the id of the setInterval () timers for the plugin operation.
In the carusels[n] object, where n is the number of the next "carousel" on the page, all the properties and methods necessary for its operation are stored:
  • width: the width of the block in which the items are hurled - "carousels"
  • height: corresponding height;
  • num: the number of "carousel" elements;
  • radiusX: radius of movement along the x-axis;
  • radiusY: radius of movement along the y-axis;
  • step: the step with which the elements on the circle will be placed;
  • angl: starting angle;
  • angl_road: "extra" angle;
  • members: links to all elements of the carousel;
  • draw: A method that calculates the position of elements;
  • change: the logical variable responsible for allowing the position of the elements to change;
  • counter_start: the initial position of the counter;
  • counter_end: the end position of the counter;
  • change_step: the step with which the elements will move around the circle
  • nonstop: A boolean variable that is responsible for allowing you to move items regardless of the start and end position of the counters;
  • carusels_right: A method that moves all items to the right for a certain step;
  • carusels_left: A method that moves all items to the left for a certain step;
  • carusels_nonstop: the method that starts the "carousel"
  • carusels_stop: method, stopping the "carousel" .
Note: the first 8 properties can be set manually, as it will be necessary. Otherwise, the values ​​of these properties will be calculated automatically. Contact email: ivan-753s@mail.ru .

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published