flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harbs <harbs.li...@gmail.com>
Subject Re: [FlexJS] Horizontal list missing scrollbar
Date Sun, 26 Feb 2017 09:44:49 GMT
I’m not sure what error you got.

I just did this, and it compiled OK. (I did not test it, and there probably needs some more
to be done on the SWF side.)

////////////////////////////////////////////////////////////////////////////////
//
//  Licensed to the Apache Software Foundation (ASF) under one or more
//  contributor license agreements.  See the NOTICE file distributed with
//  this work for additional information regarding copyright ownership.
//  The ASF licenses this file to You under the Apache License, Version 2.0
//  (the "License"); you may not use this file except in compliance with
//  the License.  You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
package org.apache.flex.html.supportClasses
{
    import org.apache.flex.core.IStrand;
    
	/**
	 * The ScrollingViewport extends the Viewport class by adding horizontal and
	 * vertical scroll bars, if needed, to the content area of a Container. In
	 * addition, the content of the Container is clipped so that items extending
	 * outside the Container are hidden and reachable only by scrolling.
	 *
	 *  @langversion 3.0
	 *  @playerversion Flash 10.2
	 *  @playerversion AIR 2.6
	 *  @productversion FlexJS 0.0
	 */
	public class HScrollingViewport extends ScrollingViewport
	{
		/**
		 * Constructor
	     *
	     *  @langversion 3.0
	     *  @playerversion Flash 10.2
	     *  @playerversion AIR 2.6
	     *  @productversion FlexJS 0.0
		 */
		public function HScrollingViewport()
		{
		}

        /**
         * @flexjsignorecoercion HTMLElement 
         */
        COMPILE::JS
        override public function set strand(value:IStrand):void
        {
            super.strand = value;
            (contentView.element as HTMLElement).style.overflow = '';
            (contentView.element as HTMLElement).style.overflowX = 'auto';
            (contentView.element as HTMLElement).style.overflowY = 'hidden';
        }

	}
}

You need to add the following to HTMLClasses a well:
	import org.apache.flex.html.supportClasses.HScrollingViewport; HScrollingViewport;


> On Feb 26, 2017, at 10:41 AM, Justin Mclean <justin@classsoftware.com> wrote:
> 
> It seems wrong to duplicate 400 odd lines of code (most of it AS code) to make other
beads just to change one line of code. Extending the class and overriding that single method
seems to give compiler errors which is unexpected. Any advice? Wouldn't it be better if overflow
was a property of the bead? 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message