Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-22715

HorizontalLayout does not calculate drop index correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK 4.5 (Release)
    • None
    • Spark: Layout
    • None
    • Affected OS(s): Windows
      Affected OS(s): Windows XP
      Browser: Firefox 3.x
      Language Found: English

    Description

      Found in SDK 4.0.0.13099

      There's a bug in calculateDropIndex(x:Number, y:Number):int.

      Line 1921:
      var centerX:Number = elementBounds.x + elementBounds.height / 2;
      Should be:
      var centerX:Number = elementBounds.x + elementBounds.width / 2;

      Looks like the code was copied from VerticalLayout and that bit was not properly updated.

      Steps to reproduce:
      1. Create list with horizontal layout.
      2. Make sure item renderers width is different from height (otherwise bug won't show).
      3. Enable drag&drop and try reordering elements.
      4. Ovserve drop indicator.

      Actual Results:
      Drop indicator does not skip to the other side properly when mouse cursor moves over center of list element.

      Expected Results:
      Drop indicator should skip to the other side as soon as mouse cursor moves over center of list element.

      Workaround (if any):
      Subclass HorizontalLayout and override calculateDropIndex.

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: