client/js/paper-renderer.js
changeset 6 a7b54105f74e
parent 5 67085e6281e5
child 7 ae86ecebb1be
--- a/client/js/paper-renderer.js	Mon Jul 30 17:52:13 2012 +0200
+++ b/client/js/paper-renderer.js	Mon Jul 30 18:44:59 2012 +0200
@@ -5,6 +5,7 @@
     _EDITOR_ARROW_WIDTH : 40,
     _EDITOR_MARGIN : 15,
     _EDITOR_PADDING : 10,
+    _EDITOR_GRADIENT : new paper.Gradient(['#f0f0f0', '#d0d0d0']),
     drawEditBox : function(_coords, _path, _width, _height) {
         var _isLeft = (_coords.x < paper.view.center.x ? 1 : -1),
             _left = _coords.x + _isLeft * ( this._EDITOR_MARGIN + this._EDITOR_ARROW_LENGTH ),
@@ -37,6 +38,7 @@
             = _bottom;
         _path.segments[1].point.y = _coords.y - this._EDITOR_ARROW_WIDTH / 2;
         _path.segments[6].point.y = _coords.y + this._EDITOR_ARROW_WIDTH / 2;
+        _path.fillColor = new paper.GradientColor(this._EDITOR_GRADIENT, [0,_top], [0, _bottom])
         return {
             left: (this._EDITOR_PADDING + Math.min(_left, _right)),
             top: (this._EDITOR_PADDING + _top)