MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / clone

Method clone

packages/core/ui/styling/background-common.ts:46–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44 public clearFlags: number = BackgroundClearFlags.NONE;
45
46 private clone(): Background {
47 const clone = new Background();
48
49 clone.color = this.color;
50 clone.image = this.image;
51 clone.repeat = this.repeat;
52 clone.position = this.position;
53 clone.size = this.size;
54 clone.borderTopColor = this.borderTopColor;
55 clone.borderRightColor = this.borderRightColor;
56 clone.borderBottomColor = this.borderBottomColor;
57 clone.borderLeftColor = this.borderLeftColor;
58 clone.borderTopWidth = this.borderTopWidth;
59 clone.borderRightWidth = this.borderRightWidth;
60 clone.borderBottomWidth = this.borderBottomWidth;
61 clone.borderLeftWidth = this.borderLeftWidth;
62 clone.borderTopLeftRadius = this.borderTopLeftRadius;
63 clone.borderTopRightRadius = this.borderTopRightRadius;
64 clone.borderBottomRightRadius = this.borderBottomRightRadius;
65 clone.borderBottomLeftRadius = this.borderBottomLeftRadius;
66 clone.clipPath = this.clipPath;
67 clone.boxShadows = this.boxShadows;
68 clone.clearFlags = this.clearFlags;
69
70 return clone;
71 }
72
73 public withColor(value: Color): Background {
74 const clone = this.clone();

Callers 15

withColorMethod · 0.95
withImageMethod · 0.95
withRepeatMethod · 0.95
withPositionMethod · 0.95
withSizeMethod · 0.95
withBorderTopColorMethod · 0.95
withBorderRightColorMethod · 0.95
withBorderBottomColorMethod · 0.95
withBorderLeftColorMethod · 0.95
withBorderTopWidthMethod · 0.95
withBorderRightWidthMethod · 0.95
withBorderBottomWidthMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected