Skip to content

1.7.0

Compare
Choose a tag to compare
@ralfstx ralfstx released this 23 Mar 09:34
· 1723 commits to master since this release

Widget constructors

Widgets can now be created using their constructors. Instead of tabris.create("Button", { text: "Submit" }), you can now write:

new tabris.Button({ text: "Submit" });

This syntax is shorter and more common. While tabris.create() will remain available in all 1.x releases, we encourage you to use constructors from now on. We've also adjusted all our snippets and examples to the new syntax.

Access all siblings of a widget

In addition to the parent() children() methods, widgets now also provide a method siblings(). This method will return a WidgetCollection of all widgets that have the same parent, excluding the target widget itself. The method can also be called with a selector expression, which makes it easy to select all siblings of a certain type:

checkbox.on("select", function() {
  checkbox.siblings("CheckBox").set("selection", false);
});

Rounded corners on widgets

The new property cornerRadius allows you to apply a rounded clipping to the corners of a widget. See the snippet on GitHub.

rounded-corners

This property is supported on iOS and Android 5.0+.

System bar theme

The theme used for the system status bar can now be controlled using a new property systemBarTheme. Possible values are "light", "dark", and "default" (which selects the platform default). This property will control the foreground text and icons on the status bar. Note that the light theme will result in a dark foreground and vice-versa. See the snippet on GitHub.

This property is supported on iOS and Android 6+.

Fetch API included

As a simpler and more flexible alternative to XmlHttpRequest, the Fetch API is now available in Tabris.js. The npm module whatwg-fetch is no longer required.

Promise included

Tabris.js now includes a full Promise implementation on all platforms. There is no need to include a promise shim anymore.