Ignore:
Timestamp:
02/03/14 13:46:41 (10 years ago)
Author:
davidb
Message:

When setting an anchor left/rightr/top/bottom on a Dot, it now looks for connected items that are constrained to the the same x (vertical) or y (horizontal) value, and sets the anchor status of that item to be the same.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/items/Text.java

    r777 r812  
    24662466                invalidateFill();
    24672467                invalidateCommonTrait(ItemAppearence.PreMoved);
     2468               
     2469                this._anchorLeft = anchor;
     2470                this._anchorRight = null;
     2471               
    24682472                int oldX = getX();
    24692473                if (anchor != null) {
     
    24712475                        anchorConnected(AnchorEdgeType.Left, deltaX);
    24722476                }
    2473                 this._anchorLeft = anchor;
    2474                 this._anchorRight = null;
     2477
    24752478                invalidateCommonTrait(ItemAppearence.PostMoved);
    24762479                invalidateFill();
     
    24902493                invalidateFill();
    24912494                invalidateCommonTrait(ItemAppearence.PreMoved);
     2495               
     2496                this._anchorRight = anchor;
     2497                this._anchorLeft = null;
     2498               
    24922499                int oldX = getX();
    24932500                if (anchor != null) {
     
    24962503                        anchorConnected(AnchorEdgeType.Right, deltaX);
    24972504                }
    2498                 this._anchorRight = anchor;
    2499                 this._anchorLeft = null;
     2505
    25002506                invalidateCommonTrait(ItemAppearence.PostMoved);
    25012507                invalidateFill();
     
    25152521                invalidateFill();
    25162522                invalidateCommonTrait(ItemAppearence.PreMoved);
     2523               
     2524                this._anchorTop = anchor;
     2525                this._anchorBottom = null;
     2526               
    25172527                int oldY = getY();
    25182528                if (anchor != null) {
     
    25202530                        anchorConnected(AnchorEdgeType.Top, deltaY);
    25212531                }
    2522                 this._anchorTop = anchor;
    2523                 this._anchorBottom = null;
     2532
    25242533                invalidateCommonTrait(ItemAppearence.PostMoved);
    25252534                invalidateFill();
     
    25342543                invalidateFill();
    25352544                invalidateCommonTrait(ItemAppearence.PreMoved);
     2545               
     2546                this._anchorBottom = anchor;
     2547                this._anchorTop = null;
     2548               
    25362549                int oldY = getY();
    25372550                if (anchor != null) {
     
    25412554                        anchorConnected(AnchorEdgeType.Bottom, deltaY);
    25422555                }
    2543                 this._anchorBottom = anchor;
    2544                 this._anchorTop = null;
     2556
    25452557                invalidateCommonTrait(ItemAppearence.PostMoved);
    25462558                invalidateFill();
Note: See TracChangeset for help on using the changeset viewer.