[sagenb] 76/157: Change default color selector to colorpicker
felix salfelder
felix-guest at moszumanska.debian.org
Mon Dec 22 16:51:50 UTC 2014
This is an automated email from the git hooks/post-receive script.
felix-guest pushed a commit to branch master
in repository sagenb.
commit ece3ebf2c5a5e4389013988182609501d9332121
Author: kcrisman <kcrisman at gmail.com>
Date: Wed Oct 1 11:51:36 2014 -0400
Change default color selector to colorpicker
This should have happened long ago in http://trac.sagemath.org/ticket/9000 and perhaps changed somewhere. Default color picking has not worked since then.
---
sagenb/notebook/interact.py | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/sagenb/notebook/interact.py b/sagenb/notebook/interact.py
index 7d8c8a7..2c4e7b0 100644
--- a/sagenb/notebook/interact.py
+++ b/sagenb/notebook/interact.py
@@ -431,7 +431,7 @@ def html_rangeslider(id, values, callback, steps, default_l=0, default_r=1,
def html_color_selector(id, change, input_change, default='000000',
- widget='jpicker', hide_box=False):
+ widget='colorpicker', hide_box=False):
"""
Return HTML representation of a jQuery color selector.
@@ -2394,9 +2394,9 @@ def interact(f, layout=None, width='800px'):
objects (a matrix or array)
* ``u = color_selector(default=(0,0,1), label=None,
- widget='farbtastic', hide_box=False)`` - a color selector with a
- possibly hidden input box; the ``widget`` can also be ``'jpicker'``
- or ``'colorpicker'``
+ widget='colorpicker', hide_box=False)`` - a color selector with a
+ possibly hidden input box; the ``widget`` can also be ``'farbtastic'``
+ or ``'jpicker'`` (currently not working properly)
* ``u = text_control(value='')`` - a block of text
@@ -2876,7 +2876,7 @@ class input_box(control):
class color_selector(input_box):
def __init__(self, default=(0, 0, 1), label=None,
- widget='jpicker', hide_box=False):
+ widget='colorpicker', hide_box=False):
r"""
A color selector (also called a color chooser, picker, or
tool) interactive control. Use this with the :func:`interact`
@@ -2892,9 +2892,9 @@ class color_selector(input_box):
- ``label`` - a string (default: None); the label rendered to
the left of the selector.
- - ``widget`` - a string (default: 'jpicker'); the color
- selector widget to use; choices are 'colorpicker', 'jpicker'
- and 'farbtastic'
+ - ``widget`` - a string (default: 'colorpicker'); the color
+ selector widget to use; choices are 'colorpicker', 'farbtastic',
+ and 'jpicker' (currently broken)
- ``hide_box`` - a boolean (default: False); whether to hide
the input box associated with the color selector widget
@@ -2902,11 +2902,11 @@ class color_selector(input_box):
EXAMPLES::
sage: color_selector()
- Interact color selector labeled None, with default RGB color (0.0, 0.0, 1.0), widget 'jpicker', and visible input box
+ Interact color selector labeled None, with default RGB color (0.0, 0.0, 1.0), widget 'colorpicker', and visible input box
sage: color_selector((0.5, 0.5, 1.0), widget='jpicker')
Interact color selector labeled None, with default RGB color (0.5, 0.5, 1.0), widget 'jpicker', and visible input box
sage: color_selector(default = Color(0, 0.5, 0.25))
- Interact color selector labeled None, with default RGB color (0.0, 0.5, 0.25), widget 'jpicker', and visible input box
+ Interact color selector labeled None, with default RGB color (0.0, 0.5, 0.25), widget 'colorpicker', and visible input box
sage: color_selector('purple', widget = 'colorpicker')
Interact color selector labeled None, with default RGB color (0.50..., 0.0, 0.50...), widget 'colorpicker', and visible input box
sage: color_selector('crayon', widget = 'colorpicker')
@@ -2936,9 +2936,9 @@ class color_selector(input_box):
EXAMPLES::
sage: color_selector(Color('red'), 'line color').__repr__()
- "Interact color selector labeled 'line color', with default RGB color (1.0, 0.0, 0.0), widget 'jpicker', and visible input box"
+ "Interact color selector labeled 'line color', with default RGB color (1.0, 0.0, 0.0), widget 'colorpicker', and visible input box"
sage: color_selector(Color((1,0,1)), 'circle color', widget='jpicker', hide_box=True).__repr__()
- "Interact color selector labeled 'circle color', with default RGB color (1.0, 0.0, 1.0), widget 'jpicker', and hidden input box"
+ "Interact color selector labeled 'circle color', with default RGB color (1.0, 0.0, 1.0), widget 'colorpicker', and hidden input box"
"""
s = "Interact color selector labeled %r, with default %r, widget %r, and " % (self.label(), self.default(), self.widget())
if self.hide_box():
@@ -2957,7 +2957,7 @@ class color_selector(input_box):
EXAMPLES::
sage: color_selector().widget()
- 'jpicker'
+ 'colorpicker'
sage: color_selector('#abcdef', hide_box=True, widget='farbtastic').widget()
'farbtastic'
sage: color_selector(widget='colorpicker').widget()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagenb.git
More information about the debian-science-commits
mailing list