You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2019/12/27 11:20:06 UTC

[royale-asjs] branch develop updated: Basic: add JS removeCSSStyleProperty utility function

This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 5b019f0  Basic: add JS removeCSSStyleProperty utility function
5b019f0 is described below

commit 5b019f0265173226b8ae668072866092e9cd6528
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Fri Dec 27 12:19:56 2019 +0100

    Basic: add JS removeCSSStyleProperty utility function
---
 .../projects/Basic/src/main/royale/BasicClasses.as |  1 +
 .../royale/html/util/removeCSSStyleProperty.as     | 41 ++++++++++++++++++++++
 2 files changed, 42 insertions(+)

diff --git a/frameworks/projects/Basic/src/main/royale/BasicClasses.as b/frameworks/projects/Basic/src/main/royale/BasicClasses.as
index 9fa88d2..a4fb15e 100644
--- a/frameworks/projects/Basic/src/main/royale/BasicClasses.as
+++ b/frameworks/projects/Basic/src/main/royale/BasicClasses.as
@@ -32,6 +32,7 @@ internal class BasicClasses
 		import org.apache.royale.html.util.addElementToWrapper; addElementToWrapper;
 		import org.apache.royale.html.util.addSvgElementToWrapper; addSvgElementToWrapper;
 		import org.apache.royale.html.util.createSVG; createSVG;
+		import org.apache.royale.html.util.removeCSSStyleProperty; removeCSSStyleProperty;
 	}
     import org.apache.royale.html.ToolTip; ToolTip;
 	import org.apache.royale.html.accessories.NumericOnlyTextInputBead; NumericOnlyTextInputBead;
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/util/removeCSSStyleProperty.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/util/removeCSSStyleProperty.as
new file mode 100644
index 0000000..33b9f74
--- /dev/null
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/util/removeCSSStyleProperty.as
@@ -0,0 +1,41 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.royale.html.util
+{
+    COMPILE::JS
+    {
+    import org.apache.royale.core.UIBase;
+    }
+    
+    /**
+     *  Utility function removeStyleProperty method removes style property
+     *  from an UIBase positioner
+	 * 
+     *  @toplevel
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.9.7
+     */ 
+    COMPILE::JS   
+	public function removeCSSStyleProperty(wrapper:UIBase, property:String):void
+	{
+        wrapper.positioner.style[property] = null;
+	}
+}