From 233ea3d05b7032439b919bfbadeef91a5f73480f Mon Sep 17 00:00:00 2001 From: peterd Date: Mon, 9 Feb 2015 18:02:52 +0100 Subject: [PATCH] stay in view-port support for scroll and resize MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …and $trigger in colorPicker model --- README.md | 2 ++ index.html | 8 ++++---- jqColorPicker.js | 14 +++++++++++--- jqColorPicker.js.map | 2 +- jqColorPicker.min.js | 2 +- 5 files changed, 19 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 1a63814..16f77c9 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ $('.color').colorPicker({ css: '', // replaces existing css cssAddon: '', // adds css to existing margin: '', // positioning margin (can also be set in cssAddon) + scrollResize: true // toggle for reposition colorPicker on window.resize/scroll preventFocus: false // prevents default on focus of input fields, body: document.body // the element where the events are attached to (touchstart, mousedown, pointerdown, focus, click, change) }); @@ -73,6 +74,7 @@ colors.js is a quite handy tool for color calculations/conversion (gray value, c If you need more complex calculations or more color spaces, use the version from https://github.com/PitPik/colorPicker. It supports also cmy, cmyk, XYZ and Lab. ```javascript myColorPicker: { + $trigger: ... // jQuery object of active trigger or null if none active color: { // instance of Color inside colorPicker colors: { all kinds of color values... see later}, options: { all the options you set or that are set as default... }, diff --git a/index.html b/index.html index c59b263..8e0a49a 100644 --- a/index.html +++ b/index.html @@ -94,9 +94,9 @@ window.myColorPicker = $('input.color').colorPicker({ - - - + + +