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

Transform effects should support "baseline" style

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Adobe Flex SDK Previous
    • Adobe Flex SDK Previous
    • Spark: Effects
    • None
    • Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Steps to reproduce:
      1. Run the code below
      2. Click on any of the buttons

      Actual Results:
      All of the buttons jump to their positions in state s2.

      Expected Results:
      The buttons should move smoothly to their new positions

      Workaround (if any):
      Don't use baseline to set different locations in states and then expect transition effects to animate the change.

      The problem is that we support many different position styles (left, top, verticalCenter, etc.), but not baseline. This support was not implemented originally because baseline did not yet work, so in addressing the FIXMEs this was an outstanding item to address.
      The fix is simple: just add "baseline" to the list of properties/styles advertised by the effect as being affected/relevant - this automatically makes the effect pay attention to that style and animate appropriatel, just like the other styles we already support.

      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/halo">
      <s:states>
      <s:State name="s1"/>
      <s:State name="s2"/>
      </s:states>
      <s:transitions>
      <s:Transition>
      <s:Parallel>
      <s:Move targets="

      {[button1]}

      "/>
      <s:Move3D targets="

      {[button2]}

      "/>
      <s:AnimateTransform targets="

      {[button3]}

      "/>
      <s:AnimateTransform3D targets="

      {[button4]}

      "/>
      </s:Parallel>
      </s:Transition>
      </s:transitions>
      <s:Button id="button1" width="100" height="100" baseline="200" baseline.s2="220" label="Move"
      click="currentState = (currentState == 's1') ? 's2' : 's1'"/>
      <s:Button id="button2" x="100" width="100" height="100" baseline="200" baseline.s2="220" label="Move3D"
      click="currentState = (currentState == 's1') ? 's2' : 's1'"/>
      <s:Button id="button3" x="200" width="100" height="100" baseline="200" baseline.s2="220" label="AnimTrans"
      click="currentState = (currentState == 's1') ? 's2' : 's1'"/>
      <s:Button id="button4" x="300" width="100" height="100" baseline="200" baseline.s2="220" label="AnimTrans3D"
      click="currentState = (currentState == 's1') ? 's2' : 's1'"/>
      </s:Application>

      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: