Skip to content

Improve ImageAsset scaling #5110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Feb 28, 2018

Conversation

DimitarTachev
Copy link

@DimitarTachev DimitarTachev commented Nov 30, 2017

  • don’t respect screen size while scaling
  • [Android only] calculate natively following the files flow when used in ImageView

The native handling of images is improved here and this version of the Image should use the updated widgets one.

Fixing issue #3955 and camera plugin issue #26

@ghost ghost assigned DimitarTachev Nov 30, 2017
@ghost ghost added the in progress label Nov 30, 2017
@ns-bot
Copy link

ns-bot commented Nov 30, 2017

Please sign CLA at http://www.nativescript.org/cla

@SvetoslavTsenov
Copy link
Contributor

uitests-ios-pickers

@ns-bot
Copy link

ns-bot commented Jan 26, 2018

CLA signature found, happy contributing!

@ns-bot ns-bot added cla: yes and removed cla: no labels Jan 26, 2018
@SvetoslavTsenov
Copy link
Contributor

tests widgets#test api25 uitests

@SvetoslavTsenov
Copy link
Contributor

test widgets#tachev/improve-images-handling api25 uitests

1 similar comment
@SvetoslavTsenov
Copy link
Contributor

test widgets#tachev/improve-images-handling api25 uitests

@SvetoslavTsenov
Copy link
Contributor

👍

@SvetoslavTsenov
Copy link
Contributor

Hey @DimitarTachev, could you please rebase again.

@DimitarTachev DimitarTachev force-pushed the tachev/fix-image-asset branch from d8a3950 to bfc26a7 Compare February 9, 2018 15:59
@SvetoslavTsenov
Copy link
Contributor

test widgets#tachev/improve-images-handling api25 uitests

@p-3
Copy link

p-3 commented Feb 19, 2018

any update when this will be merged?

@SvetoslavTsenov
Copy link
Contributor

test widgets#tachev/improve-images-handling

@SvetoslavTsenov
Copy link
Contributor

test branch_widgets#tachev/improve-images-handling

1 similar comment
@SvetoslavTsenov
Copy link
Contributor

test branch_widgets#tachev/improve-images-handling

@ADjenkov ADjenkov force-pushed the tachev/fix-image-asset branch from bfc26a7 to aee37d2 Compare February 27, 2018 07:35
@ghost ghost assigned ADjenkov Feb 27, 2018
@ADjenkov ADjenkov self-requested a review February 27, 2018 08:21
@ADjenkov
Copy link
Contributor

test branch_widgets#tachev/improve-images-handling

@SvetoslavTsenov
Copy link
Contributor

👍

reqHeight = (options.height > 0 && options.height < reqHeight) ? options.height : reqHeight;
}
var reqWidth = options.width || src.width;
var reqHeight = options.height || src.height;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fall back to min(src.width, platform.screen.mainScreen.widthDIPs * density)

platform.screen.mainScreen.width?

return;
}

const async = this.loadMode === ASYNC;
let decodeWidth = this.decodeWidth;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fallback to screenSize

@@ -348,6 +348,7 @@
setRotationAngle(angle: number): void;

setUri(uri: string, decodeWidth: number, decodeHeight: number, useCache: boolean, async: boolean): void;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider removing setUri

Check if called without keepAspectRatio

@ADjenkov ADjenkov merged commit a94ec99 into NativeScript:master Feb 28, 2018
@ghost ghost removed the in progress label Feb 28, 2018
vchimev added a commit to NativeScript/functional-tests that referenced this pull request Mar 7, 2018
@lock
Copy link

lock bot commented Aug 26, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Aug 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants