Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19409] Windows: Layout parity: View should "crop" child view

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-08-27T16:10:40.000+0000
Affected Version/sRelease 4.0.0
Fix Version/sRelease 5.0.0
ComponentsWindows
Labelsn/a
ReporterKota Iguchi
AssigneeKota Iguchi
Created2015-08-26T05:19:11.000+0000
Updated2015-09-03T16:20:51.000+0000

Description

Ti.UI.View and its subclasses should "crop" child views if they are bigger than the parent view. Currently child views does "overflow" parent view.
var win = Ti.UI.createWindow({ backgroundColor: 'blue' });

var view = Ti.UI.createView({
    backgroundColor: 'red',
    width: 185, height: 185,
    zindex: 20
});

var image = Ti.UI.createView({
    backgroundColor: 'yellow',
    top: -20, left: -185,
    width: 555, height: 312
});

var imageview = Ti.UI.createImageView({
    image: 'http://image.tmdb.org/t/p/w780//3FweBee0xZoY77uO1bhUOlQorNH.jpg',
    top: -20, left: -185,
    width: 555, height: 312
});
image.add(imageview);

view.add(image);

win.add(view);
win.open()

Attachments

FileDateSize
ios.png2015-08-26T05:17:46.000+000053951
windows.png2015-08-26T05:17:46.000+0000107234

Comments

  1. Kota Iguchi 2015-08-27

    https://github.com/appcelerator/titanium_mobile_windows/pull/417
  2. Ewan Harris 2015-09-03

    Verified using: Windows 8.1 Appc CLI Core: 5.0.0-33 Appc CLI NPM: 4.2.0-1 Titanium SDK: 5.0.0.v20150902095518 Nokia Lumia 930 8.1 When a child view is added that is smaller than the parent, the child view is cropped, matching ios.png Closing ticket

JSON Source