old_sql 1.16.0 → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +24 -13
- data/app/controllers/old_sql/report_controller.rb +3 -17
- data/app/views/layouts/old_sql/chart.html.erb +11 -0
- data/app/views/old_sql/report/chart.html.erb +8 -25
- data/lib/generators/old_sql/templates/user_design_template.csv +2 -3
- data/lib/generators/old_sql/templates/user_old_sql_demo_chart_design.yml +18 -9
- data/lib/old_sql/report_design/chart.rb +2 -2
- data/lib/old_sql/report_design/chart_item.rb +4 -4
- data/lib/old_sql/report_design/chart_parser.rb +2 -2
- data/public/javascripts/old_sql/chart.js +33 -0
- metadata +5 -265
- data/public/javascripts/old_sql/MochiKit-1.4.2/Changes +0 -362
- data/public/javascripts/old_sql/MochiKit-1.4.2/LICENSE.txt +0 -69
- data/public/javascripts/old_sql/MochiKit-1.4.2/MANIFEST +0 -179
- data/public/javascripts/old_sql/MochiKit-1.4.2/META.json +0 -17
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Async.html +0 -814
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Base.html +0 -1703
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Color.html +0 -755
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DOM.html +0 -1197
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DateTime.html +0 -168
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DragAndDrop.html +0 -187
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Format.html +0 -300
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Iter.html +0 -524
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Logging.html +0 -420
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/LoggingPane.html +0 -142
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Position.html +0 -38
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Selector.html +0 -240
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Signal.html +0 -508
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Sortable.html +0 -244
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Style.html +0 -385
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/VersionHistory.html +0 -384
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Visual.html +0 -1161
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/index.html +0 -447
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/js/toc.js +0 -113
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Async.rst +0 -767
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Base.rst +0 -1445
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Color.rst +0 -651
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DOM.rst +0 -1143
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DateTime.rst +0 -145
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DragAndDrop.rst +0 -197
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Format.rst +0 -258
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Iter.rst +0 -454
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Logging.rst +0 -348
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/LoggingPane.rst +0 -128
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Position.rst +0 -26
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Selector.rst +0 -203
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Signal.rst +0 -498
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Sortable.rst +0 -186
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Style.rst +0 -353
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/VersionHistory.rst +0 -362
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Visual.rst +0 -895
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/index.rst +0 -83
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/ajax_tables.css +0 -69
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/ajax_tables.js +0 -401
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/domains.json +0 -10
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/domains.xml +0 -40
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/index.html +0 -96
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/color_wheel.css +0 -4
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/color_wheel.js +0 -95
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/index.html +0 -31
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/dnd_sortable.css +0 -23
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/dropmarker.png +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/icon.png +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/index.html +0 -54
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable2_test.html +0 -150
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable3_test.html +0 -42
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable4_test.html +0 -90
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable5_test.html +0 -29
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable_test.html +0 -38
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable_tree_test.html +0 -189
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/draggable.css +0 -28
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/draggable.js +0 -73
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/index.html +0 -38
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_bigslide.html +0 -36
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_blind.html +0 -65
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_blindslide.html +0 -31
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_combi.css +0 -18
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_fadeappear.html +0 -61
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_grow_shrink.html +0 -38
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_onload.html +0 -67
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_queue.html +0 -67
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_queue_limit.html +0 -30
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_scroll.html +0 -483
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_slide.html +0 -62
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/full.html +0 -71
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/icon.png +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/index.html +0 -150
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/index.html +0 -88
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/interpreter.css +0 -54
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/interpreter.js +0 -373
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/index.html +0 -78
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/key_events.css +0 -5
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/key_events.js +0 -85
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/index.html +0 -46
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/logging_pane.css +0 -78
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/logging_pane.js +0 -11
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/index.html +0 -74
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/mochiregexp.css +0 -73
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/mochiregexp.js +0 -125
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/index.html +0 -88
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/mouse_events.css +0 -17
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/mouse_events.js +0 -59
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/index.html +0 -28
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/rounded_corners.css +0 -3
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/rounded_corners.js +0 -19
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_boxes.html +0 -45
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_full.html +0 -119
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_ghost.html +0 -40
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_hoverclass.html +0 -43
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_scroll.html +0 -91
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_snap.html +0 -54
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/index.html +0 -93
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/simple_dnd.css +0 -64
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/index.html +0 -71
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/sortable_tables.css +0 -66
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/sortable_tables.js +0 -203
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/SyntaxHighlighter.css +0 -177
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/Tests.html +0 -339
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushCSharp.js +0 -30
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushDelphi.js +0 -31
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushJScript.js +0 -22
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushPhp.js +0 -23
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushPython.js +0 -71
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushSql.js +0 -40
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushVb.js +0 -29
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushXml.js +0 -61
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shCore.js +0 -622
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.css +0 -1
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.html +0 -19
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.js +0 -70
- data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/bg_docheader.gif +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/g_bullet.gif +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/g_logo_doc.gif +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/include/css/documentation.css +0 -130
- data/public/javascripts/old_sql/MochiKit-1.4.2/include/css/general.css +0 -48
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Async.js +0 -682
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Base.js +0 -1489
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Color.js +0 -863
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DOM.js +0 -1256
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DateTime.js +0 -222
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DragAndDrop.js +0 -793
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Format.js +0 -304
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Iter.js +0 -844
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Logging.js +0 -315
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/LoggingPane.js +0 -353
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/MochiKit.js +0 -188
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/MockDOM.js +0 -115
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Position.js +0 -236
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Selector.js +0 -415
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Signal.js +0 -897
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Sortable.js +0 -589
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Style.js +0 -594
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Test.js +0 -162
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Visual.js +0 -2026
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/__package__.js +0 -18
- data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/MochiKit.js +0 -7829
- data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/__package__.js +0 -6
- data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/customize.html +0 -251
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/FakeJSAN.js +0 -40
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/SimpleTest.js +0 -381
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/TestRunner.js +0 -159
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/test.css +0 -28
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/cli.js +0 -6
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/index.html +0 -25
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/standalone.js +0 -16
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Base.js +0 -577
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Color.js +0 -137
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_DateTime.js +0 -52
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_DragAndDrop.js +0 -30
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Format.js +0 -89
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Iter.js +0 -186
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Logging.js +0 -88
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Async.html +0 -408
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Async.json +0 -1
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Base.html +0 -34
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Color.html +0 -84
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DOM-Safari.html +0 -48
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DOM.html +0 -363
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DateTime.html +0 -39
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DragAndDrop.html +0 -54
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Format.html +0 -39
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Iter.html +0 -38
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-JSAN.html +0 -32
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Logging.html +0 -40
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-MochiKit.html +0 -18
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Selector.html +0 -295
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Signal.html +0 -43
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Style.html +0 -223
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Visual.html +0 -197
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Signal.js +0 -481
- data/public/javascripts/old_sql/plotkit-0.9.1/COPYING +0 -28
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Base.js +0 -406
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Canvas.js +0 -683
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/EasyPlot.js +0 -161
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Layout.js +0 -756
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/PlotKit.js +0 -151
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/PlotKit_Packed.js +0 -2177
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SVG.js +0 -705
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SweetCanvas.js +0 -348
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SweetSVG.js +0 -247
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/dummy.svg +0 -9
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/excanvas.js +0 -723
- data/public/javascripts/old_sql/plotkit-0.9.1/README +0 -1
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/MochiKitAdditions.html +0 -2
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/MochiKitAdditions.txt +0 -2
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Base.html +0 -302
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Base.txt +0 -139
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Canvas.html +0 -172
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Canvas.txt +0 -81
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.EasyPlot.html +0 -155
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.EasyPlot.txt +0 -50
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Layout.html +0 -428
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Layout.txt +0 -330
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.QuickStart.html +0 -368
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.QuickStart.txt +0 -256
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Renderer.html +0 -436
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Renderer.txt +0 -299
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SVG.html +0 -159
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SVG.txt +0 -64
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetCanvas.html +0 -131
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetCanvas.txt +0 -34
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetSVG.html +0 -131
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetSVG.txt +0 -34
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.html +0 -334
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.txt +0 -151
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/SVGCanvasCompat.html +0 -304
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/SVGCanvasCompat.txt +0 -144
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/barsample.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/black.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/blue.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/cyan.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/doc.css +0 -62
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/generate.py +0 -37
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/green.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/orange.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/piesample.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/purple.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/red.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/scripts/custom_rhino.jar +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/scripts/pack.py +0 -58
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/axis.html +0 -31
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/basic.html +0 -25
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/basic.js +0 -143
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/debug.html +0 -56
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo-svg.html +0 -58
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo-svg.js +0 -133
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo.html +0 -57
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo.js +0 -136
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/dynamic.html +0 -161
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/firefox.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/konqueror.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/mozilla.ico +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/msie.gif +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/opera.ico +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/safari.gif +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/labels-img.html +0 -38
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/labels.html +0 -43
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/prototype_compat.html +0 -28
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-easy.html +0 -29
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-horiz.html +0 -53
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-neg.html +0 -29
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-svg.html +0 -61
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart.html +0 -57
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/sample.txt +0 -6
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg-sweet.html +0 -29
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg-sweet.js +0 -141
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg.html +0 -26
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg.js +0 -147
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/sweet.html +0 -24
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/sweet.js +0 -89
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/tests.css +0 -66
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.html +0 -20
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.js +0 -31
@@ -1,863 +0,0 @@
|
|
1
|
-
/***
|
2
|
-
|
3
|
-
MochiKit.Color 1.4.2
|
4
|
-
|
5
|
-
See <http://mochikit.com/> for documentation, downloads, license, etc.
|
6
|
-
|
7
|
-
(c) 2005 Bob Ippolito and others. All rights Reserved.
|
8
|
-
|
9
|
-
***/
|
10
|
-
|
11
|
-
MochiKit.Base._deps('Color', ['Base', 'DOM', 'Style']);
|
12
|
-
|
13
|
-
MochiKit.Color.NAME = "MochiKit.Color";
|
14
|
-
MochiKit.Color.VERSION = "1.4.2";
|
15
|
-
|
16
|
-
MochiKit.Color.__repr__ = function () {
|
17
|
-
return "[" + this.NAME + " " + this.VERSION + "]";
|
18
|
-
};
|
19
|
-
|
20
|
-
MochiKit.Color.toString = function () {
|
21
|
-
return this.__repr__();
|
22
|
-
};
|
23
|
-
|
24
|
-
|
25
|
-
/** @id MochiKit.Color.Color */
|
26
|
-
MochiKit.Color.Color = function (red, green, blue, alpha) {
|
27
|
-
if (typeof(alpha) == 'undefined' || alpha === null) {
|
28
|
-
alpha = 1.0;
|
29
|
-
}
|
30
|
-
this.rgb = {
|
31
|
-
r: red,
|
32
|
-
g: green,
|
33
|
-
b: blue,
|
34
|
-
a: alpha
|
35
|
-
};
|
36
|
-
};
|
37
|
-
|
38
|
-
|
39
|
-
// Prototype methods
|
40
|
-
|
41
|
-
MochiKit.Color.Color.prototype = {
|
42
|
-
|
43
|
-
__class__: MochiKit.Color.Color,
|
44
|
-
|
45
|
-
/** @id MochiKit.Color.Color.prototype.colorWithAlpha */
|
46
|
-
colorWithAlpha: function (alpha) {
|
47
|
-
var rgb = this.rgb;
|
48
|
-
var m = MochiKit.Color;
|
49
|
-
return m.Color.fromRGB(rgb.r, rgb.g, rgb.b, alpha);
|
50
|
-
},
|
51
|
-
|
52
|
-
/** @id MochiKit.Color.Color.prototype.colorWithHue */
|
53
|
-
colorWithHue: function (hue) {
|
54
|
-
// get an HSL model, and set the new hue...
|
55
|
-
var hsl = this.asHSL();
|
56
|
-
hsl.h = hue;
|
57
|
-
var m = MochiKit.Color;
|
58
|
-
// convert back to RGB...
|
59
|
-
return m.Color.fromHSL(hsl);
|
60
|
-
},
|
61
|
-
|
62
|
-
/** @id MochiKit.Color.Color.prototype.colorWithSaturation */
|
63
|
-
colorWithSaturation: function (saturation) {
|
64
|
-
// get an HSL model, and set the new hue...
|
65
|
-
var hsl = this.asHSL();
|
66
|
-
hsl.s = saturation;
|
67
|
-
var m = MochiKit.Color;
|
68
|
-
// convert back to RGB...
|
69
|
-
return m.Color.fromHSL(hsl);
|
70
|
-
},
|
71
|
-
|
72
|
-
/** @id MochiKit.Color.Color.prototype.colorWithLightness */
|
73
|
-
colorWithLightness: function (lightness) {
|
74
|
-
// get an HSL model, and set the new hue...
|
75
|
-
var hsl = this.asHSL();
|
76
|
-
hsl.l = lightness;
|
77
|
-
var m = MochiKit.Color;
|
78
|
-
// convert back to RGB...
|
79
|
-
return m.Color.fromHSL(hsl);
|
80
|
-
},
|
81
|
-
|
82
|
-
/** @id MochiKit.Color.Color.prototype.darkerColorWithLevel */
|
83
|
-
darkerColorWithLevel: function (level) {
|
84
|
-
var hsl = this.asHSL();
|
85
|
-
hsl.l = Math.max(hsl.l - level, 0);
|
86
|
-
var m = MochiKit.Color;
|
87
|
-
return m.Color.fromHSL(hsl);
|
88
|
-
},
|
89
|
-
|
90
|
-
/** @id MochiKit.Color.Color.prototype.lighterColorWithLevel */
|
91
|
-
lighterColorWithLevel: function (level) {
|
92
|
-
var hsl = this.asHSL();
|
93
|
-
hsl.l = Math.min(hsl.l + level, 1);
|
94
|
-
var m = MochiKit.Color;
|
95
|
-
return m.Color.fromHSL(hsl);
|
96
|
-
},
|
97
|
-
|
98
|
-
/** @id MochiKit.Color.Color.prototype.blendedColor */
|
99
|
-
blendedColor: function (other, /* optional */ fraction) {
|
100
|
-
if (typeof(fraction) == 'undefined' || fraction === null) {
|
101
|
-
fraction = 0.5;
|
102
|
-
}
|
103
|
-
var sf = 1.0 - fraction;
|
104
|
-
var s = this.rgb;
|
105
|
-
var d = other.rgb;
|
106
|
-
var df = fraction;
|
107
|
-
return MochiKit.Color.Color.fromRGB(
|
108
|
-
(s.r * sf) + (d.r * df),
|
109
|
-
(s.g * sf) + (d.g * df),
|
110
|
-
(s.b * sf) + (d.b * df),
|
111
|
-
(s.a * sf) + (d.a * df)
|
112
|
-
);
|
113
|
-
},
|
114
|
-
|
115
|
-
/** @id MochiKit.Color.Color.prototype.compareRGB */
|
116
|
-
compareRGB: function (other) {
|
117
|
-
var a = this.asRGB();
|
118
|
-
var b = other.asRGB();
|
119
|
-
return MochiKit.Base.compare(
|
120
|
-
[a.r, a.g, a.b, a.a],
|
121
|
-
[b.r, b.g, b.b, b.a]
|
122
|
-
);
|
123
|
-
},
|
124
|
-
|
125
|
-
/** @id MochiKit.Color.Color.prototype.isLight */
|
126
|
-
isLight: function () {
|
127
|
-
return this.asHSL().b > 0.5;
|
128
|
-
},
|
129
|
-
|
130
|
-
/** @id MochiKit.Color.Color.prototype.isDark */
|
131
|
-
isDark: function () {
|
132
|
-
return (!this.isLight());
|
133
|
-
},
|
134
|
-
|
135
|
-
/** @id MochiKit.Color.Color.prototype.toHSLString */
|
136
|
-
toHSLString: function () {
|
137
|
-
var c = this.asHSL();
|
138
|
-
var ccc = MochiKit.Color.clampColorComponent;
|
139
|
-
var rval = this._hslString;
|
140
|
-
if (!rval) {
|
141
|
-
var mid = (
|
142
|
-
ccc(c.h, 360).toFixed(0)
|
143
|
-
+ "," + ccc(c.s, 100).toPrecision(4) + "%"
|
144
|
-
+ "," + ccc(c.l, 100).toPrecision(4) + "%"
|
145
|
-
);
|
146
|
-
var a = c.a;
|
147
|
-
if (a >= 1) {
|
148
|
-
a = 1;
|
149
|
-
rval = "hsl(" + mid + ")";
|
150
|
-
} else {
|
151
|
-
if (a <= 0) {
|
152
|
-
a = 0;
|
153
|
-
}
|
154
|
-
rval = "hsla(" + mid + "," + a + ")";
|
155
|
-
}
|
156
|
-
this._hslString = rval;
|
157
|
-
}
|
158
|
-
return rval;
|
159
|
-
},
|
160
|
-
|
161
|
-
/** @id MochiKit.Color.Color.prototype.toRGBString */
|
162
|
-
toRGBString: function () {
|
163
|
-
var c = this.rgb;
|
164
|
-
var ccc = MochiKit.Color.clampColorComponent;
|
165
|
-
var rval = this._rgbString;
|
166
|
-
if (!rval) {
|
167
|
-
var mid = (
|
168
|
-
ccc(c.r, 255).toFixed(0)
|
169
|
-
+ "," + ccc(c.g, 255).toFixed(0)
|
170
|
-
+ "," + ccc(c.b, 255).toFixed(0)
|
171
|
-
);
|
172
|
-
if (c.a != 1) {
|
173
|
-
rval = "rgba(" + mid + "," + c.a + ")";
|
174
|
-
} else {
|
175
|
-
rval = "rgb(" + mid + ")";
|
176
|
-
}
|
177
|
-
this._rgbString = rval;
|
178
|
-
}
|
179
|
-
return rval;
|
180
|
-
},
|
181
|
-
|
182
|
-
/** @id MochiKit.Color.Color.prototype.asRGB */
|
183
|
-
asRGB: function () {
|
184
|
-
return MochiKit.Base.clone(this.rgb);
|
185
|
-
},
|
186
|
-
|
187
|
-
/** @id MochiKit.Color.Color.prototype.toHexString */
|
188
|
-
toHexString: function () {
|
189
|
-
var m = MochiKit.Color;
|
190
|
-
var c = this.rgb;
|
191
|
-
var ccc = MochiKit.Color.clampColorComponent;
|
192
|
-
var rval = this._hexString;
|
193
|
-
if (!rval) {
|
194
|
-
rval = ("#" +
|
195
|
-
m.toColorPart(ccc(c.r, 255)) +
|
196
|
-
m.toColorPart(ccc(c.g, 255)) +
|
197
|
-
m.toColorPart(ccc(c.b, 255))
|
198
|
-
);
|
199
|
-
this._hexString = rval;
|
200
|
-
}
|
201
|
-
return rval;
|
202
|
-
},
|
203
|
-
|
204
|
-
/** @id MochiKit.Color.Color.prototype.asHSV */
|
205
|
-
asHSV: function () {
|
206
|
-
var hsv = this.hsv;
|
207
|
-
var c = this.rgb;
|
208
|
-
if (typeof(hsv) == 'undefined' || hsv === null) {
|
209
|
-
hsv = MochiKit.Color.rgbToHSV(this.rgb);
|
210
|
-
this.hsv = hsv;
|
211
|
-
}
|
212
|
-
return MochiKit.Base.clone(hsv);
|
213
|
-
},
|
214
|
-
|
215
|
-
/** @id MochiKit.Color.Color.prototype.asHSL */
|
216
|
-
asHSL: function () {
|
217
|
-
var hsl = this.hsl;
|
218
|
-
var c = this.rgb;
|
219
|
-
if (typeof(hsl) == 'undefined' || hsl === null) {
|
220
|
-
hsl = MochiKit.Color.rgbToHSL(this.rgb);
|
221
|
-
this.hsl = hsl;
|
222
|
-
}
|
223
|
-
return MochiKit.Base.clone(hsl);
|
224
|
-
},
|
225
|
-
|
226
|
-
/** @id MochiKit.Color.Color.prototype.toString */
|
227
|
-
toString: function () {
|
228
|
-
return this.toRGBString();
|
229
|
-
},
|
230
|
-
|
231
|
-
/** @id MochiKit.Color.Color.prototype.repr */
|
232
|
-
repr: function () {
|
233
|
-
var c = this.rgb;
|
234
|
-
var col = [c.r, c.g, c.b, c.a];
|
235
|
-
return this.__class__.NAME + "(" + col.join(", ") + ")";
|
236
|
-
}
|
237
|
-
|
238
|
-
};
|
239
|
-
|
240
|
-
// Constructor methods
|
241
|
-
|
242
|
-
MochiKit.Base.update(MochiKit.Color.Color, {
|
243
|
-
/** @id MochiKit.Color.Color.fromRGB */
|
244
|
-
fromRGB: function (red, green, blue, alpha) {
|
245
|
-
// designated initializer
|
246
|
-
var Color = MochiKit.Color.Color;
|
247
|
-
if (arguments.length == 1) {
|
248
|
-
var rgb = red;
|
249
|
-
red = rgb.r;
|
250
|
-
green = rgb.g;
|
251
|
-
blue = rgb.b;
|
252
|
-
if (typeof(rgb.a) == 'undefined') {
|
253
|
-
alpha = undefined;
|
254
|
-
} else {
|
255
|
-
alpha = rgb.a;
|
256
|
-
}
|
257
|
-
}
|
258
|
-
return new Color(red, green, blue, alpha);
|
259
|
-
},
|
260
|
-
|
261
|
-
/** @id MochiKit.Color.Color.fromHSL */
|
262
|
-
fromHSL: function (hue, saturation, lightness, alpha) {
|
263
|
-
var m = MochiKit.Color;
|
264
|
-
return m.Color.fromRGB(m.hslToRGB.apply(m, arguments));
|
265
|
-
},
|
266
|
-
|
267
|
-
/** @id MochiKit.Color.Color.fromHSV */
|
268
|
-
fromHSV: function (hue, saturation, value, alpha) {
|
269
|
-
var m = MochiKit.Color;
|
270
|
-
return m.Color.fromRGB(m.hsvToRGB.apply(m, arguments));
|
271
|
-
},
|
272
|
-
|
273
|
-
/** @id MochiKit.Color.Color.fromName */
|
274
|
-
fromName: function (name) {
|
275
|
-
var Color = MochiKit.Color.Color;
|
276
|
-
// Opera 9 seems to "quote" named colors(?!)
|
277
|
-
if (name.charAt(0) == '"') {
|
278
|
-
name = name.substr(1, name.length - 2);
|
279
|
-
}
|
280
|
-
var htmlColor = Color._namedColors[name.toLowerCase()];
|
281
|
-
if (typeof(htmlColor) == 'string') {
|
282
|
-
return Color.fromHexString(htmlColor);
|
283
|
-
} else if (name == "transparent") {
|
284
|
-
return Color.transparentColor();
|
285
|
-
}
|
286
|
-
return null;
|
287
|
-
},
|
288
|
-
|
289
|
-
/** @id MochiKit.Color.Color.fromString */
|
290
|
-
fromString: function (colorString) {
|
291
|
-
var self = MochiKit.Color.Color;
|
292
|
-
var three = colorString.substr(0, 3);
|
293
|
-
if (three == "rgb") {
|
294
|
-
return self.fromRGBString(colorString);
|
295
|
-
} else if (three == "hsl") {
|
296
|
-
return self.fromHSLString(colorString);
|
297
|
-
} else if (colorString.charAt(0) == "#") {
|
298
|
-
return self.fromHexString(colorString);
|
299
|
-
}
|
300
|
-
return self.fromName(colorString);
|
301
|
-
},
|
302
|
-
|
303
|
-
|
304
|
-
/** @id MochiKit.Color.Color.fromHexString */
|
305
|
-
fromHexString: function (hexCode) {
|
306
|
-
if (hexCode.charAt(0) == '#') {
|
307
|
-
hexCode = hexCode.substring(1);
|
308
|
-
}
|
309
|
-
var components = [];
|
310
|
-
var i, hex;
|
311
|
-
if (hexCode.length == 3) {
|
312
|
-
for (i = 0; i < 3; i++) {
|
313
|
-
hex = hexCode.substr(i, 1);
|
314
|
-
components.push(parseInt(hex + hex, 16) / 255.0);
|
315
|
-
}
|
316
|
-
} else {
|
317
|
-
for (i = 0; i < 6; i += 2) {
|
318
|
-
hex = hexCode.substr(i, 2);
|
319
|
-
components.push(parseInt(hex, 16) / 255.0);
|
320
|
-
}
|
321
|
-
}
|
322
|
-
var Color = MochiKit.Color.Color;
|
323
|
-
return Color.fromRGB.apply(Color, components);
|
324
|
-
},
|
325
|
-
|
326
|
-
|
327
|
-
_fromColorString: function (pre, method, scales, colorCode) {
|
328
|
-
// parses either HSL or RGB
|
329
|
-
if (colorCode.indexOf(pre) === 0) {
|
330
|
-
colorCode = colorCode.substring(colorCode.indexOf("(", 3) + 1, colorCode.length - 1);
|
331
|
-
}
|
332
|
-
var colorChunks = colorCode.split(/\s*,\s*/);
|
333
|
-
var colorFloats = [];
|
334
|
-
for (var i = 0; i < colorChunks.length; i++) {
|
335
|
-
var c = colorChunks[i];
|
336
|
-
var val;
|
337
|
-
var three = c.substring(c.length - 3);
|
338
|
-
if (c.charAt(c.length - 1) == '%') {
|
339
|
-
val = 0.01 * parseFloat(c.substring(0, c.length - 1));
|
340
|
-
} else if (three == "deg") {
|
341
|
-
val = parseFloat(c) / 360.0;
|
342
|
-
} else if (three == "rad") {
|
343
|
-
val = parseFloat(c) / (Math.PI * 2);
|
344
|
-
} else {
|
345
|
-
val = scales[i] * parseFloat(c);
|
346
|
-
}
|
347
|
-
colorFloats.push(val);
|
348
|
-
}
|
349
|
-
return this[method].apply(this, colorFloats);
|
350
|
-
},
|
351
|
-
|
352
|
-
/** @id MochiKit.Color.Color.fromComputedStyle */
|
353
|
-
fromComputedStyle: function (elem, style) {
|
354
|
-
var d = MochiKit.DOM;
|
355
|
-
var cls = MochiKit.Color.Color;
|
356
|
-
for (elem = d.getElement(elem); elem; elem = elem.parentNode) {
|
357
|
-
var actualColor = MochiKit.Style.getStyle.apply(d, arguments);
|
358
|
-
if (!actualColor) {
|
359
|
-
continue;
|
360
|
-
}
|
361
|
-
var color = cls.fromString(actualColor);
|
362
|
-
if (!color) {
|
363
|
-
break;
|
364
|
-
}
|
365
|
-
if (color.asRGB().a > 0) {
|
366
|
-
return color;
|
367
|
-
}
|
368
|
-
}
|
369
|
-
return null;
|
370
|
-
},
|
371
|
-
|
372
|
-
/** @id MochiKit.Color.Color.fromBackground */
|
373
|
-
fromBackground: function (elem) {
|
374
|
-
var cls = MochiKit.Color.Color;
|
375
|
-
return cls.fromComputedStyle(
|
376
|
-
elem, "backgroundColor", "background-color") || cls.whiteColor();
|
377
|
-
},
|
378
|
-
|
379
|
-
/** @id MochiKit.Color.Color.fromText */
|
380
|
-
fromText: function (elem) {
|
381
|
-
var cls = MochiKit.Color.Color;
|
382
|
-
return cls.fromComputedStyle(
|
383
|
-
elem, "color", "color") || cls.blackColor();
|
384
|
-
},
|
385
|
-
|
386
|
-
/** @id MochiKit.Color.Color.namedColors */
|
387
|
-
namedColors: function () {
|
388
|
-
return MochiKit.Base.clone(MochiKit.Color.Color._namedColors);
|
389
|
-
}
|
390
|
-
});
|
391
|
-
|
392
|
-
|
393
|
-
// Module level functions
|
394
|
-
|
395
|
-
MochiKit.Base.update(MochiKit.Color, {
|
396
|
-
/** @id MochiKit.Color.clampColorComponent */
|
397
|
-
clampColorComponent: function (v, scale) {
|
398
|
-
v *= scale;
|
399
|
-
if (v < 0) {
|
400
|
-
return 0;
|
401
|
-
} else if (v > scale) {
|
402
|
-
return scale;
|
403
|
-
} else {
|
404
|
-
return v;
|
405
|
-
}
|
406
|
-
},
|
407
|
-
|
408
|
-
_hslValue: function (n1, n2, hue) {
|
409
|
-
if (hue > 6.0) {
|
410
|
-
hue -= 6.0;
|
411
|
-
} else if (hue < 0.0) {
|
412
|
-
hue += 6.0;
|
413
|
-
}
|
414
|
-
var val;
|
415
|
-
if (hue < 1.0) {
|
416
|
-
val = n1 + (n2 - n1) * hue;
|
417
|
-
} else if (hue < 3.0) {
|
418
|
-
val = n2;
|
419
|
-
} else if (hue < 4.0) {
|
420
|
-
val = n1 + (n2 - n1) * (4.0 - hue);
|
421
|
-
} else {
|
422
|
-
val = n1;
|
423
|
-
}
|
424
|
-
return val;
|
425
|
-
},
|
426
|
-
|
427
|
-
/** @id MochiKit.Color.hsvToRGB */
|
428
|
-
hsvToRGB: function (hue, saturation, value, alpha) {
|
429
|
-
if (arguments.length == 1) {
|
430
|
-
var hsv = hue;
|
431
|
-
hue = hsv.h;
|
432
|
-
saturation = hsv.s;
|
433
|
-
value = hsv.v;
|
434
|
-
alpha = hsv.a;
|
435
|
-
}
|
436
|
-
var red;
|
437
|
-
var green;
|
438
|
-
var blue;
|
439
|
-
if (saturation === 0) {
|
440
|
-
red = value;
|
441
|
-
green = value;
|
442
|
-
blue = value;
|
443
|
-
} else {
|
444
|
-
var i = Math.floor(hue * 6);
|
445
|
-
var f = (hue * 6) - i;
|
446
|
-
var p = value * (1 - saturation);
|
447
|
-
var q = value * (1 - (saturation * f));
|
448
|
-
var t = value * (1 - (saturation * (1 - f)));
|
449
|
-
switch (i) {
|
450
|
-
case 1: red = q; green = value; blue = p; break;
|
451
|
-
case 2: red = p; green = value; blue = t; break;
|
452
|
-
case 3: red = p; green = q; blue = value; break;
|
453
|
-
case 4: red = t; green = p; blue = value; break;
|
454
|
-
case 5: red = value; green = p; blue = q; break;
|
455
|
-
case 6: // fall through
|
456
|
-
case 0: red = value; green = t; blue = p; break;
|
457
|
-
}
|
458
|
-
}
|
459
|
-
return {
|
460
|
-
r: red,
|
461
|
-
g: green,
|
462
|
-
b: blue,
|
463
|
-
a: alpha
|
464
|
-
};
|
465
|
-
},
|
466
|
-
|
467
|
-
/** @id MochiKit.Color.hslToRGB */
|
468
|
-
hslToRGB: function (hue, saturation, lightness, alpha) {
|
469
|
-
if (arguments.length == 1) {
|
470
|
-
var hsl = hue;
|
471
|
-
hue = hsl.h;
|
472
|
-
saturation = hsl.s;
|
473
|
-
lightness = hsl.l;
|
474
|
-
alpha = hsl.a;
|
475
|
-
}
|
476
|
-
var red;
|
477
|
-
var green;
|
478
|
-
var blue;
|
479
|
-
if (saturation === 0) {
|
480
|
-
red = lightness;
|
481
|
-
green = lightness;
|
482
|
-
blue = lightness;
|
483
|
-
} else {
|
484
|
-
var m2;
|
485
|
-
if (lightness <= 0.5) {
|
486
|
-
m2 = lightness * (1.0 + saturation);
|
487
|
-
} else {
|
488
|
-
m2 = lightness + saturation - (lightness * saturation);
|
489
|
-
}
|
490
|
-
var m1 = (2.0 * lightness) - m2;
|
491
|
-
var f = MochiKit.Color._hslValue;
|
492
|
-
var h6 = hue * 6.0;
|
493
|
-
red = f(m1, m2, h6 + 2);
|
494
|
-
green = f(m1, m2, h6);
|
495
|
-
blue = f(m1, m2, h6 - 2);
|
496
|
-
}
|
497
|
-
return {
|
498
|
-
r: red,
|
499
|
-
g: green,
|
500
|
-
b: blue,
|
501
|
-
a: alpha
|
502
|
-
};
|
503
|
-
},
|
504
|
-
|
505
|
-
/** @id MochiKit.Color.rgbToHSV */
|
506
|
-
rgbToHSV: function (red, green, blue, alpha) {
|
507
|
-
if (arguments.length == 1) {
|
508
|
-
var rgb = red;
|
509
|
-
red = rgb.r;
|
510
|
-
green = rgb.g;
|
511
|
-
blue = rgb.b;
|
512
|
-
alpha = rgb.a;
|
513
|
-
}
|
514
|
-
var max = Math.max(Math.max(red, green), blue);
|
515
|
-
var min = Math.min(Math.min(red, green), blue);
|
516
|
-
var hue;
|
517
|
-
var saturation;
|
518
|
-
var value = max;
|
519
|
-
if (min == max) {
|
520
|
-
hue = 0;
|
521
|
-
saturation = 0;
|
522
|
-
} else {
|
523
|
-
var delta = (max - min);
|
524
|
-
saturation = delta / max;
|
525
|
-
|
526
|
-
if (red == max) {
|
527
|
-
hue = (green - blue) / delta;
|
528
|
-
} else if (green == max) {
|
529
|
-
hue = 2 + ((blue - red) / delta);
|
530
|
-
} else {
|
531
|
-
hue = 4 + ((red - green) / delta);
|
532
|
-
}
|
533
|
-
hue /= 6;
|
534
|
-
if (hue < 0) {
|
535
|
-
hue += 1;
|
536
|
-
}
|
537
|
-
if (hue > 1) {
|
538
|
-
hue -= 1;
|
539
|
-
}
|
540
|
-
}
|
541
|
-
return {
|
542
|
-
h: hue,
|
543
|
-
s: saturation,
|
544
|
-
v: value,
|
545
|
-
a: alpha
|
546
|
-
};
|
547
|
-
},
|
548
|
-
|
549
|
-
/** @id MochiKit.Color.rgbToHSL */
|
550
|
-
rgbToHSL: function (red, green, blue, alpha) {
|
551
|
-
if (arguments.length == 1) {
|
552
|
-
var rgb = red;
|
553
|
-
red = rgb.r;
|
554
|
-
green = rgb.g;
|
555
|
-
blue = rgb.b;
|
556
|
-
alpha = rgb.a;
|
557
|
-
}
|
558
|
-
var max = Math.max(red, Math.max(green, blue));
|
559
|
-
var min = Math.min(red, Math.min(green, blue));
|
560
|
-
var hue;
|
561
|
-
var saturation;
|
562
|
-
var lightness = (max + min) / 2.0;
|
563
|
-
var delta = max - min;
|
564
|
-
if (delta === 0) {
|
565
|
-
hue = 0;
|
566
|
-
saturation = 0;
|
567
|
-
} else {
|
568
|
-
if (lightness <= 0.5) {
|
569
|
-
saturation = delta / (max + min);
|
570
|
-
} else {
|
571
|
-
saturation = delta / (2 - max - min);
|
572
|
-
}
|
573
|
-
if (red == max) {
|
574
|
-
hue = (green - blue) / delta;
|
575
|
-
} else if (green == max) {
|
576
|
-
hue = 2 + ((blue - red) / delta);
|
577
|
-
} else {
|
578
|
-
hue = 4 + ((red - green) / delta);
|
579
|
-
}
|
580
|
-
hue /= 6;
|
581
|
-
if (hue < 0) {
|
582
|
-
hue += 1;
|
583
|
-
}
|
584
|
-
if (hue > 1) {
|
585
|
-
hue -= 1;
|
586
|
-
}
|
587
|
-
|
588
|
-
}
|
589
|
-
return {
|
590
|
-
h: hue,
|
591
|
-
s: saturation,
|
592
|
-
l: lightness,
|
593
|
-
a: alpha
|
594
|
-
};
|
595
|
-
},
|
596
|
-
|
597
|
-
/** @id MochiKit.Color.toColorPart */
|
598
|
-
toColorPart: function (num) {
|
599
|
-
num = Math.round(num);
|
600
|
-
var digits = num.toString(16);
|
601
|
-
if (num < 16) {
|
602
|
-
return '0' + digits;
|
603
|
-
}
|
604
|
-
return digits;
|
605
|
-
},
|
606
|
-
|
607
|
-
__new__: function () {
|
608
|
-
var m = MochiKit.Base;
|
609
|
-
/** @id MochiKit.Color.fromRGBString */
|
610
|
-
this.Color.fromRGBString = m.bind(
|
611
|
-
this.Color._fromColorString, this.Color, "rgb", "fromRGB",
|
612
|
-
[1.0/255.0, 1.0/255.0, 1.0/255.0, 1]
|
613
|
-
);
|
614
|
-
/** @id MochiKit.Color.fromHSLString */
|
615
|
-
this.Color.fromHSLString = m.bind(
|
616
|
-
this.Color._fromColorString, this.Color, "hsl", "fromHSL",
|
617
|
-
[1.0/360.0, 0.01, 0.01, 1]
|
618
|
-
);
|
619
|
-
|
620
|
-
var third = 1.0 / 3.0;
|
621
|
-
/** @id MochiKit.Color.colors */
|
622
|
-
var colors = {
|
623
|
-
// NSColor colors plus transparent
|
624
|
-
/** @id MochiKit.Color.blackColor */
|
625
|
-
black: [0, 0, 0],
|
626
|
-
/** @id MochiKit.Color.blueColor */
|
627
|
-
blue: [0, 0, 1],
|
628
|
-
/** @id MochiKit.Color.brownColor */
|
629
|
-
brown: [0.6, 0.4, 0.2],
|
630
|
-
/** @id MochiKit.Color.cyanColor */
|
631
|
-
cyan: [0, 1, 1],
|
632
|
-
/** @id MochiKit.Color.darkGrayColor */
|
633
|
-
darkGray: [third, third, third],
|
634
|
-
/** @id MochiKit.Color.grayColor */
|
635
|
-
gray: [0.5, 0.5, 0.5],
|
636
|
-
/** @id MochiKit.Color.greenColor */
|
637
|
-
green: [0, 1, 0],
|
638
|
-
/** @id MochiKit.Color.lightGrayColor */
|
639
|
-
lightGray: [2 * third, 2 * third, 2 * third],
|
640
|
-
/** @id MochiKit.Color.magentaColor */
|
641
|
-
magenta: [1, 0, 1],
|
642
|
-
/** @id MochiKit.Color.orangeColor */
|
643
|
-
orange: [1, 0.5, 0],
|
644
|
-
/** @id MochiKit.Color.purpleColor */
|
645
|
-
purple: [0.5, 0, 0.5],
|
646
|
-
/** @id MochiKit.Color.redColor */
|
647
|
-
red: [1, 0, 0],
|
648
|
-
/** @id MochiKit.Color.transparentColor */
|
649
|
-
transparent: [0, 0, 0, 0],
|
650
|
-
/** @id MochiKit.Color.whiteColor */
|
651
|
-
white: [1, 1, 1],
|
652
|
-
/** @id MochiKit.Color.yellowColor */
|
653
|
-
yellow: [1, 1, 0]
|
654
|
-
};
|
655
|
-
|
656
|
-
var makeColor = function (name, r, g, b, a) {
|
657
|
-
var rval = this.fromRGB(r, g, b, a);
|
658
|
-
this[name] = function () { return rval; };
|
659
|
-
return rval;
|
660
|
-
};
|
661
|
-
|
662
|
-
for (var k in colors) {
|
663
|
-
var name = k + "Color";
|
664
|
-
var bindArgs = m.concat(
|
665
|
-
[makeColor, this.Color, name],
|
666
|
-
colors[k]
|
667
|
-
);
|
668
|
-
this.Color[name] = m.bind.apply(null, bindArgs);
|
669
|
-
}
|
670
|
-
|
671
|
-
var isColor = function () {
|
672
|
-
for (var i = 0; i < arguments.length; i++) {
|
673
|
-
if (!(arguments[i] instanceof MochiKit.Color.Color)) {
|
674
|
-
return false;
|
675
|
-
}
|
676
|
-
}
|
677
|
-
return true;
|
678
|
-
};
|
679
|
-
|
680
|
-
var compareColor = function (a, b) {
|
681
|
-
return a.compareRGB(b);
|
682
|
-
};
|
683
|
-
|
684
|
-
m.nameFunctions(this);
|
685
|
-
|
686
|
-
m.registerComparator(this.Color.NAME, isColor, compareColor);
|
687
|
-
|
688
|
-
this.EXPORT_TAGS = {
|
689
|
-
":common": this.EXPORT,
|
690
|
-
":all": m.concat(this.EXPORT, this.EXPORT_OK)
|
691
|
-
};
|
692
|
-
|
693
|
-
}
|
694
|
-
});
|
695
|
-
|
696
|
-
MochiKit.Color.EXPORT = [
|
697
|
-
"Color"
|
698
|
-
];
|
699
|
-
|
700
|
-
MochiKit.Color.EXPORT_OK = [
|
701
|
-
"clampColorComponent",
|
702
|
-
"rgbToHSL",
|
703
|
-
"hslToRGB",
|
704
|
-
"rgbToHSV",
|
705
|
-
"hsvToRGB",
|
706
|
-
"toColorPart"
|
707
|
-
];
|
708
|
-
|
709
|
-
MochiKit.Color.__new__();
|
710
|
-
|
711
|
-
MochiKit.Base._exportSymbols(this, MochiKit.Color);
|
712
|
-
|
713
|
-
// Full table of css3 X11 colors <http://www.w3.org/TR/css3-color/#X11COLORS>
|
714
|
-
|
715
|
-
MochiKit.Color.Color._namedColors = {
|
716
|
-
aliceblue: "#f0f8ff",
|
717
|
-
antiquewhite: "#faebd7",
|
718
|
-
aqua: "#00ffff",
|
719
|
-
aquamarine: "#7fffd4",
|
720
|
-
azure: "#f0ffff",
|
721
|
-
beige: "#f5f5dc",
|
722
|
-
bisque: "#ffe4c4",
|
723
|
-
black: "#000000",
|
724
|
-
blanchedalmond: "#ffebcd",
|
725
|
-
blue: "#0000ff",
|
726
|
-
blueviolet: "#8a2be2",
|
727
|
-
brown: "#a52a2a",
|
728
|
-
burlywood: "#deb887",
|
729
|
-
cadetblue: "#5f9ea0",
|
730
|
-
chartreuse: "#7fff00",
|
731
|
-
chocolate: "#d2691e",
|
732
|
-
coral: "#ff7f50",
|
733
|
-
cornflowerblue: "#6495ed",
|
734
|
-
cornsilk: "#fff8dc",
|
735
|
-
crimson: "#dc143c",
|
736
|
-
cyan: "#00ffff",
|
737
|
-
darkblue: "#00008b",
|
738
|
-
darkcyan: "#008b8b",
|
739
|
-
darkgoldenrod: "#b8860b",
|
740
|
-
darkgray: "#a9a9a9",
|
741
|
-
darkgreen: "#006400",
|
742
|
-
darkgrey: "#a9a9a9",
|
743
|
-
darkkhaki: "#bdb76b",
|
744
|
-
darkmagenta: "#8b008b",
|
745
|
-
darkolivegreen: "#556b2f",
|
746
|
-
darkorange: "#ff8c00",
|
747
|
-
darkorchid: "#9932cc",
|
748
|
-
darkred: "#8b0000",
|
749
|
-
darksalmon: "#e9967a",
|
750
|
-
darkseagreen: "#8fbc8f",
|
751
|
-
darkslateblue: "#483d8b",
|
752
|
-
darkslategray: "#2f4f4f",
|
753
|
-
darkslategrey: "#2f4f4f",
|
754
|
-
darkturquoise: "#00ced1",
|
755
|
-
darkviolet: "#9400d3",
|
756
|
-
deeppink: "#ff1493",
|
757
|
-
deepskyblue: "#00bfff",
|
758
|
-
dimgray: "#696969",
|
759
|
-
dimgrey: "#696969",
|
760
|
-
dodgerblue: "#1e90ff",
|
761
|
-
firebrick: "#b22222",
|
762
|
-
floralwhite: "#fffaf0",
|
763
|
-
forestgreen: "#228b22",
|
764
|
-
fuchsia: "#ff00ff",
|
765
|
-
gainsboro: "#dcdcdc",
|
766
|
-
ghostwhite: "#f8f8ff",
|
767
|
-
gold: "#ffd700",
|
768
|
-
goldenrod: "#daa520",
|
769
|
-
gray: "#808080",
|
770
|
-
green: "#008000",
|
771
|
-
greenyellow: "#adff2f",
|
772
|
-
grey: "#808080",
|
773
|
-
honeydew: "#f0fff0",
|
774
|
-
hotpink: "#ff69b4",
|
775
|
-
indianred: "#cd5c5c",
|
776
|
-
indigo: "#4b0082",
|
777
|
-
ivory: "#fffff0",
|
778
|
-
khaki: "#f0e68c",
|
779
|
-
lavender: "#e6e6fa",
|
780
|
-
lavenderblush: "#fff0f5",
|
781
|
-
lawngreen: "#7cfc00",
|
782
|
-
lemonchiffon: "#fffacd",
|
783
|
-
lightblue: "#add8e6",
|
784
|
-
lightcoral: "#f08080",
|
785
|
-
lightcyan: "#e0ffff",
|
786
|
-
lightgoldenrodyellow: "#fafad2",
|
787
|
-
lightgray: "#d3d3d3",
|
788
|
-
lightgreen: "#90ee90",
|
789
|
-
lightgrey: "#d3d3d3",
|
790
|
-
lightpink: "#ffb6c1",
|
791
|
-
lightsalmon: "#ffa07a",
|
792
|
-
lightseagreen: "#20b2aa",
|
793
|
-
lightskyblue: "#87cefa",
|
794
|
-
lightslategray: "#778899",
|
795
|
-
lightslategrey: "#778899",
|
796
|
-
lightsteelblue: "#b0c4de",
|
797
|
-
lightyellow: "#ffffe0",
|
798
|
-
lime: "#00ff00",
|
799
|
-
limegreen: "#32cd32",
|
800
|
-
linen: "#faf0e6",
|
801
|
-
magenta: "#ff00ff",
|
802
|
-
maroon: "#800000",
|
803
|
-
mediumaquamarine: "#66cdaa",
|
804
|
-
mediumblue: "#0000cd",
|
805
|
-
mediumorchid: "#ba55d3",
|
806
|
-
mediumpurple: "#9370db",
|
807
|
-
mediumseagreen: "#3cb371",
|
808
|
-
mediumslateblue: "#7b68ee",
|
809
|
-
mediumspringgreen: "#00fa9a",
|
810
|
-
mediumturquoise: "#48d1cc",
|
811
|
-
mediumvioletred: "#c71585",
|
812
|
-
midnightblue: "#191970",
|
813
|
-
mintcream: "#f5fffa",
|
814
|
-
mistyrose: "#ffe4e1",
|
815
|
-
moccasin: "#ffe4b5",
|
816
|
-
navajowhite: "#ffdead",
|
817
|
-
navy: "#000080",
|
818
|
-
oldlace: "#fdf5e6",
|
819
|
-
olive: "#808000",
|
820
|
-
olivedrab: "#6b8e23",
|
821
|
-
orange: "#ffa500",
|
822
|
-
orangered: "#ff4500",
|
823
|
-
orchid: "#da70d6",
|
824
|
-
palegoldenrod: "#eee8aa",
|
825
|
-
palegreen: "#98fb98",
|
826
|
-
paleturquoise: "#afeeee",
|
827
|
-
palevioletred: "#db7093",
|
828
|
-
papayawhip: "#ffefd5",
|
829
|
-
peachpuff: "#ffdab9",
|
830
|
-
peru: "#cd853f",
|
831
|
-
pink: "#ffc0cb",
|
832
|
-
plum: "#dda0dd",
|
833
|
-
powderblue: "#b0e0e6",
|
834
|
-
purple: "#800080",
|
835
|
-
red: "#ff0000",
|
836
|
-
rosybrown: "#bc8f8f",
|
837
|
-
royalblue: "#4169e1",
|
838
|
-
saddlebrown: "#8b4513",
|
839
|
-
salmon: "#fa8072",
|
840
|
-
sandybrown: "#f4a460",
|
841
|
-
seagreen: "#2e8b57",
|
842
|
-
seashell: "#fff5ee",
|
843
|
-
sienna: "#a0522d",
|
844
|
-
silver: "#c0c0c0",
|
845
|
-
skyblue: "#87ceeb",
|
846
|
-
slateblue: "#6a5acd",
|
847
|
-
slategray: "#708090",
|
848
|
-
slategrey: "#708090",
|
849
|
-
snow: "#fffafa",
|
850
|
-
springgreen: "#00ff7f",
|
851
|
-
steelblue: "#4682b4",
|
852
|
-
tan: "#d2b48c",
|
853
|
-
teal: "#008080",
|
854
|
-
thistle: "#d8bfd8",
|
855
|
-
tomato: "#ff6347",
|
856
|
-
turquoise: "#40e0d0",
|
857
|
-
violet: "#ee82ee",
|
858
|
-
wheat: "#f5deb3",
|
859
|
-
white: "#ffffff",
|
860
|
-
whitesmoke: "#f5f5f5",
|
861
|
-
yellow: "#ffff00",
|
862
|
-
yellowgreen: "#9acd32"
|
863
|
-
};
|