code: function(rect) {
              var result = new $.Point(rect.x, rect.y);
              var properties = $.Placement.properties[this.placement];
              if (properties) {
                  if (properties.isHorizontallyCentered) {
                      result.x += rect.width / 2;
                  } else if (properties.isRight) {
                      result.x += rect.width;
                  }
                  if (properties.isVerticallyCentered) {
                      result.y += rect.height / 2;
                  } else if (properties.isBottom) {
                      result.y += rect.height;
                  }
              }
              return result;
          }
docs: private