calendar-tiler
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "calendar-tiler", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Algorithm for tiling a calendar filled with appointments", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -27,6 +27,9 @@ Calendar Tiler | ||
================= | ||
Using npm: (https://www.npmjs.com/package/calendar-tiler) | ||
* `npm install calendar-tiler` | ||
Please consult the example files to see the full process in action and to see how it could be used from start to finish. | ||
There's only one public facing function, `window.calendarTiler.tileAppointments`, it can be called with two parameters, | ||
* `appointments` [Required] (Type: Array[Object]) objects to be tiled, each appointment needs to include 2 properties, | ||
There's only one public facing function, `calendarTiler.tileAppointments`, it can be called with two parameters, | ||
* `appointments` (Required) (Type: array[object]) objects to be tiled, each appointment needs to include 2 properties, | ||
1. `<START_VALUE>` (Type: number) specifying the start of the appointment | ||
@@ -44,4 +47,4 @@ 2. `<END_VALUE>` (or `<DURATION_VALUE>`) (Type: number) specifying the end of the appointment (or the duration of the appointment), note that if you are not using durational units, then `<END_VALUE>` must be greater than `<START_VALUE>` and if you are using durational units then `<DURATION_VALUE>` must be greater than 0. | ||
The output is a single object with 2 properties, | ||
* `sortedAppointments` (Type: Array[Object]) containing the input appointments sorted into a new array by `start` ascending and `end` descending | ||
* `positions` (Type: Array[Object]) in the same order as the `sortedAppointments` order, each member contains 4 properties | ||
* `sortedAppointments` (Type: array[object]) containing the input appointments sorted into a new array by `start` ascending and `end` descending | ||
* `positions` (Type: array[object]) in the same order as the `sortedAppointments` order, each member contains 4 properties | ||
1. `x` (Type: number) the x-coordinate for where the sorted appointment should be placed on the x-axis | ||
@@ -48,0 +51,0 @@ 2. `dx` (Type: number) the width for how wide the sorted appointment should be on the x-axis |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59861
163