mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
fix(color): setAlpha and other methods return proper Color class (#10441)
This commit is contained in:
@ -1,11 +1,12 @@
|
|||||||
import * as definition from '.';
|
import * as definition from '.';
|
||||||
import * as types from '../utils/types';
|
import * as types from '../utils/types';
|
||||||
import * as knownColors from './known-colors';
|
import * as knownColors from './known-colors';
|
||||||
|
import { Color } from '.';
|
||||||
|
|
||||||
const SHARP = '#';
|
const SHARP = '#';
|
||||||
const HEX_REGEX = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i;
|
const HEX_REGEX = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i;
|
||||||
|
|
||||||
export class Color implements definition.Color {
|
export class ColorBase implements definition.Color {
|
||||||
private _argb: number;
|
private _argb: number;
|
||||||
private _name: string;
|
private _name: string;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Color as ColorBase } from './color-common';
|
import { ColorBase } from './color-common';
|
||||||
|
|
||||||
export class Color extends ColorBase {
|
export class Color extends ColorBase {
|
||||||
get android(): number {
|
get android(): number {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Color as ColorBase } from './color-common';
|
import { ColorBase } from './color-common';
|
||||||
|
|
||||||
export class Color extends ColorBase {
|
export class Color extends ColorBase {
|
||||||
private _ios: UIColor;
|
private _ios: UIColor;
|
||||||
|
Reference in New Issue
Block a user