Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 153F0200B52 for ; Mon, 25 Jul 2016 09:39:18 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 13B18160A7D; Mon, 25 Jul 2016 07:39:18 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5C654160A78 for ; Mon, 25 Jul 2016 09:39:17 +0200 (CEST) Received: (qmail 72495 invoked by uid 500); 25 Jul 2016 07:39:16 -0000 Mailing-List: contact commits-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list commits@flex.apache.org Received: (qmail 72487 invoked by uid 99); 25 Jul 2016 07:39:16 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jul 2016 07:39:16 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 343D9E00A7; Mon, 25 Jul 2016 07:39:16 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: harbs@apache.org To: commits@flex.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: [flex-asjs] [refs/heads/svg-rename] - Made label nonselectable by default (does not work in IE 10 or lower) Date: Mon, 25 Jul 2016 07:39:16 +0000 (UTC) archived-at: Mon, 25 Jul 2016 07:39:18 -0000 Repository: flex-asjs Updated Branches: refs/heads/svg-rename 26606c884 -> 580ededbd Made label nonselectable by default (does not work in IE 10 or lower) Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/580ededb Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/580ededb Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/580ededb Branch: refs/heads/svg-rename Commit: 580ededbd9283a77b672f4b25c45378e075b822d Parents: 26606c8 Author: Harbs Authored: Mon Jul 25 10:39:09 2016 +0300 Committer: Harbs Committed: Mon Jul 25 10:39:09 2016 +0300 ---------------------------------------------------------------------- .../src/main/flex/org/apache/flex/html/Label.as | 27 ++++++++++++++++++++ manualtests/FlexJSTest_SVG/src/SkinsView.mxml | 4 +-- 2 files changed, 29 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/580ededb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Label.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Label.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Label.as index b811ec5..21282f8 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Label.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Label.as @@ -134,6 +134,28 @@ package org.apache.flex.html this.dispatchEvent('textChange'); } } + private var _selectable:Boolean; + + public function get selectable():Boolean + { + return _selectable; + } + public function set selectable(value:Boolean):void + { + if(value != _selectable) + { + _selectable = value; + COMPILE::JS + { + if(element) + { + element.style.cursor = _selectable ? "auto" : "default"; + element.style.pointerEvents = _selectable ? "auto" : "none"; + } + } + } + + } /** @@ -157,6 +179,11 @@ package org.apache.flex.html positioner = element; element.flexjs_wrapper = this; element.style.whiteSpace = "nowrap"; + if(!selectable) + { + element.style.cursor = "default"; + element.style.pointerEvents = "none"; + } className = "Label"; typeNames = "Label"; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/580ededb/manualtests/FlexJSTest_SVG/src/SkinsView.mxml ---------------------------------------------------------------------- diff --git a/manualtests/FlexJSTest_SVG/src/SkinsView.mxml b/manualtests/FlexJSTest_SVG/src/SkinsView.mxml index 9140b31..e1a95d3 100644 --- a/manualtests/FlexJSTest_SVG/src/SkinsView.mxml +++ b/manualtests/FlexJSTest_SVG/src/SkinsView.mxml @@ -72,7 +72,7 @@ limitations under the License. --> - + @@ -100,7 +100,7 @@ limitations under the License. - +