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 2020/06/17 19:48:02 UTC
[royale-asjs] branch develop updated: jewel-simpleloader: a first
iteration of a new loader component for jewel. while working on this
component I found a problem with Object transpiling (I created a compiler
issue),
also CSS @keyframe compiles in library but can't reach application CSS,
so we don't have keyframe support)
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 037d491 jewel-simpleloader: a first iteration of a new loader component for jewel. while working on this component I found a problem with Object transpiling (I created a compiler issue), also CSS @keyframe compiles in library but can't reach application CSS, so we don't have keyframe support)
037d491 is described below
commit 037d49185874a8edc86d092dd3de8bd655c86a32
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Wed Jun 17 21:47:48 2020 +0200
jewel-simpleloader: a first iteration of a new loader component for jewel. while working on this component I found a problem with Object transpiling (I created a compiler issue), also CSS @keyframe compiles in library but can't reach application CSS, so we don't have keyframe support)
---
.../projects/Jewel/src/main/resources/defaults.css | 8 +++
.../Jewel/src/main/resources/jewel-manifest.xml | 2 +
.../royale/org/apache/royale/jewel/SimpleLoader.as | 62 ++++++++++++++++++++++
.../Jewel/src/main/sass/components/_loader.sass | 35 ++++++++++++
.../projects/Jewel/src/main/sass/defaults.sass | 1 +
5 files changed, 108 insertions(+)
diff --git a/frameworks/projects/Jewel/src/main/resources/defaults.css b/frameworks/projects/Jewel/src/main/resources/defaults.css
index dc0c32e..62ef902 100644
--- a/frameworks/projects/Jewel/src/main/resources/defaults.css
+++ b/frameworks/projects/Jewel/src/main/resources/defaults.css
@@ -1010,6 +1010,14 @@ j|ListItemRenderer {
IBeadController: ClassReference("org.apache.royale.html.beads.controllers.ItemRendererMouseController");
}
+.jewel.loader {
+ border: 16px solid #f3f3f3;
+ border-radius: 50%;
+}
+.jewel.loader.segment {
+ border-top: 16px solid #3498db;
+}
+
.jewel.label {
-webkit-font-smoothing: antialiased;
cursor: default;
diff --git a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
index 970de29..55136c2 100644
--- a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
+++ b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
@@ -34,6 +34,8 @@
<component id="Grid" class="org.apache.royale.jewel.Grid"/>
<component id="ScrollableGrid" class="org.apache.royale.jewel.ScrollableGrid"/>
<component id="GridCell" class="org.apache.royale.jewel.GridCell"/>
+
+ <component id="SimpleLoader" class="org.apache.royale.jewel.SimpleLoader"/>
<component id="SimpleTable" class="org.apache.royale.jewel.SimpleTable"/>
<component id="Table" class="org.apache.royale.jewel.Table"/>
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/SimpleLoader.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/SimpleLoader.as
new file mode 100644
index 0000000..1ddea6b
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/SimpleLoader.as
@@ -0,0 +1,62 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.jewel
+{
+ import org.apache.royale.core.StyledUIBase;
+
+ /**
+ * The SimpleLoader class is widget used to show some progressing.
+ * It could be while loading dome data, or waiting for interface to complete
+ * some task.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.10.0
+ */
+ public class SimpleLoader extends StyledUIBase
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.10.0
+ */
+ public function SimpleLoader()
+ {
+ super();
+
+ typeNames = "jewel loader segment";
+
+ }
+
+ public function start():void
+ {
+ COMPILE::JS
+ {
+ var timing:Object = new Object();
+ timing["duration"] = 1000;
+ timing["iterations"] = Infinity;
+ element["animate"]([{ transform: "rotate(0deg)"},{ transform: "rotate(360deg)"}], timing);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/frameworks/projects/Jewel/src/main/sass/components/_loader.sass b/frameworks/projects/Jewel/src/main/sass/components/_loader.sass
new file mode 100644
index 0000000..6714f74
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/sass/components/_loader.sass
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+// Jewel Loader
+// Loader variables
+.jewel.loader
+ border: 16px solid #f3f3f3
+ border-radius: 50%
+
+ &.segment
+ border-top: 16px solid #3498db
+
+ //animation: spin 2s linear infinite
+
+ // @keyframes spin
+ // 0%
+ // transform: rotate(0deg)
+ // 100%
+ // transform: rotate(360deg)
\ No newline at end of file
diff --git a/frameworks/projects/Jewel/src/main/sass/defaults.sass b/frameworks/projects/Jewel/src/main/sass/defaults.sass
index 70022ea..de27732 100644
--- a/frameworks/projects/Jewel/src/main/sass/defaults.sass
+++ b/frameworks/projects/Jewel/src/main/sass/defaults.sass
@@ -43,6 +43,7 @@
@import "components/icons"
@import "components/image"
@import "components/itemRenderer"
+@import "components/loader"
@import "components/label"
@import "components/layout"
@import "components/list"