Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nativescript-community/ui-material-core

Package Overview
Dependencies
Maintainers
19
Versions
252
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nativescript-community/ui-material-core - npm Package Compare versions

Comparing version 7.2.5 to 7.2.6

58

index.ios.js

@@ -195,5 +195,6 @@ import { Background, Button, Color, ControlStateChangeListener, CoreTypes, GestureTypes, PercentLength, TouchAction, Utils, View, backgroundInternalProperty } from '@nativescript/core';

// MDCInkColorThemer.applyColorSchemeToInkView(colorScheme, this.inkTouchController.defaultInkView);
if (this.style.backgroundInternal) {
this.inkTouchController.rippleView.layer.cornerRadius = Utils.layout.toDeviceIndependentPixels(this.style.backgroundInternal.borderTopLeftRadius);
}
this.inkTouchController.rippleView.usesSuperviewShadowLayerAsMask = true;
// if (this.style.backgroundInternal) {
// this.inkTouchController.rippleView.layer.cornerRadius = Utils.layout.toDeviceIndependentPixels(this.style.backgroundInternal.borderTopLeftRadius);
// }
}

@@ -206,6 +207,14 @@ return this.inkTouchController;

// create the shadow Layer
//@ts-ignore
// const shadowView = ShadowView.alloc().init();
// this.shadowView = shadowView;
// this.shadowView.userInteractionEnabled = false;
// shadowView.clipsToBounds = false;
const layer = (this.shadowLayer = MDCShadowLayer.alloc().init());
// const layer = (this.shadowLayer = shadowView.layer);
layer.shouldRasterize = true;
layer.rasterizationScale = UIScreen.mainScreen.scale;
// shadowView.frame = this.nativeViewProtected.layer.bounds;
layer.frame = this.nativeViewProtected.layer.bounds;
// this.nativeViewProtected.addSubview(shadowView);
this.nativeViewProtected.layer.addSublayer(this.shadowLayer);

@@ -215,5 +224,7 @@ // we need to set clipToBounds to false. For now it overrides user choice.

this.nativeViewProtected.clipsToBounds = false;
if (this.style.backgroundInternal) {
layer.cornerRadius = Utils.layout.toDeviceIndependentPixels(this.style.backgroundInternal.borderTopLeftRadius);
}
layer.cornerRadius = this.nativeViewProtected.layer.cornerRadius;
layer.mask = this.nativeViewProtected.layer.mask;
// if (this.style.backgroundInternal) {
// layer.cornerRadius = Utils.layout.toDeviceIndependentPixels(this.style.backgroundInternal.borderTopLeftRadius);
// }
if (this.nativeViewProtected instanceof UIControl) {

@@ -225,7 +236,21 @@ this.startElevationStateChangeHandler();

}
_onSizeChanged() {
if (this.nativeViewProtected && this.shadowLayer) {
this.shadowLayer.frame = this.nativeViewProtected.layer.bounds;
updateLayers() {
const layer = this.nativeViewProtected.layer;
if (layer) {
const mask = layer.mask;
if (layer && this.inkTouchController) {
this.inkTouchController.rippleView.layer.cornerRadius = layer.cornerRadius;
this.inkTouchController.rippleView.layer.mask = layer.mask;
}
if (layer && this.shadowLayer) {
this.shadowLayer.frame = this.nativeViewProtected.layer.bounds;
this.shadowLayer.cornerRadius = layer.cornerRadius;
this.shadowLayer.mask = layer.mask;
}
layer.mask = mask;
}
}
_onSizeChanged() {
this.updateLayers();
}
_setNativeClipToBounds() {

@@ -325,10 +350,15 @@ if (this.shadowLayer) {

[backgroundInternalProperty.setNative](value) {
// base impl will be called before
// if (this.shadowLayer) {
// this.shadowLayer.cornerRadius = Utils.layout.toDeviceIndependentPixels(value.borderTopLeftRadius);
// }
const layer = this.nativeViewProtected.layer;
if (this.inkTouchController) {
this.inkTouchController.rippleView.layer.cornerRadius = Utils.layout.toDeviceIndependentPixels(value.borderTopLeftRadius);
this.inkTouchController.rippleView.layer.cornerRadius = layer.cornerRadius;
this.inkTouchController.rippleView.layer.mask = layer.mask;
}
if (this.shadowLayer) {
this.shadowLayer.cornerRadius = layer.cornerRadius;
this.shadowLayer.mask = layer.mask;
}
}
_redrawNativeBackground(value) {
this.updateLayers();
}
}

@@ -335,0 +365,0 @@ __decorate([

{
"name": "@nativescript-community/ui-material-core",
"version": "7.2.5",
"version": "7.2.6",
"description": "Material Core component",

@@ -41,3 +41,3 @@ "main": "./index",

"readmeFilename": "README.md",
"gitHead": "f902ec0ab6b3605985d237a14fbc0af346a2f19d"
"gitHead": "0ebe287d965b70523d75f2d5fb0b79f07fe34269"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc