Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Tilegrid problems with tileWidth

    Hello,

    I'm having some problems with tilegrid and images. Even if i set a big tileWidth my images are cropped on the right side.

    My tile grid:

    Code:
    isc.TileGrid.create({
    				ID: 'templateGrid',
    				tileWidth:300,
    				tileHeight:190,
    				height:400,
    				width:"100%",
    				showAllRecords:true,
    				autoDraw: false,
    				dataSource: templateDataSource,
    				fields: [
    				        {name:"image", type:"image", imageURLPrefix:"../../img/templates/"},
    				        {name:"name"}
    				]            
    });
    You can check the attached image that shows how my image shows up. Note that this image width is only 128px while my tileWidth is 300.

    Any ideas of how can i fix this?

    This tile grid is within a window that has width set to 800px.

    Thanks!
    Attached Files

    #2
    Stand alone example based on demo http://www.smartclient.com/#tilingBasic

    Code:
    <html>
    	<head>
    		<SCRIPT>var isomorphicDir="smartclientRuntime/isomorphic/";</SCRIPT>
    		<SCRIPT SRC=smartclientRuntime/isomorphic/system/modules/ISC_Core.js></SCRIPT>
    		<SCRIPT SRC=smartclientRuntime/isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    		<SCRIPT SRC=smartclientRuntime/isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    		<SCRIPT SRC=smartclientRuntime/isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    		<SCRIPT SRC=smartclientRuntime/isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    		<SCRIPT SRC=smartclientRuntime/isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
    		<SCRIPT SRC=smartclientRuntime/isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
    	</head>
    	<body>
    		<script>
    		animalData = [
    			{
    				picture:"Elephant.jpg", 
    				commonName:"Elephant (African)", 
    				information:"The African Elephant is the largest of all land animals and also has the biggest brain of any land animal. Both males and females have ivory tusks. Elephants are also wonderful swimmers. Man is the only real enemy of the elephant. Man threatens the elephant by killing it for its tusks and by destroying its habitat.", 
    				lifeSpan:60, 
    				scientificName:"Loxodonta africana", 
    				diet:"Herbivore", 
    				status:"Threatened" 
    			}, 
    			{
    				picture:"Alligator.jpg", 
    				commonName:"Alligator (American)", 
    				information:"In the 16th century, Spanish explorers in what is now Florida encountered a large formidable animal which they called \"el largo\" meaning \"the lizard\". The name \"el largo\" gradually became pronounced \"alligator\".", 
    				lifeSpan:50, 
    				scientificName:"Allligator mississippiensis", 
    				diet:"Carnivore", 
    				status:"Not Endangered"
    			}, 
    			{
    				picture:"AntEater.jpg", 
    				commonName:"Anteater", 
    				information:"Anteaters can eat up to 35,000 ants daily. Tongue is around 2 feet long and is not sticky but rather covered with saliva. They have very strong sharp claws used for digging up anthills and termite mounds.", 
    				lifeSpan:25, 
    				scientificName:"Myrmecophaga tridactyla", 
    				diet:"Ground dwelling ants/termites", 
    				status:"Not Endangered" 
    			}
    		];
    
    		isc.TileGrid.create({
    			tileWidth:150,
    			tileHeight:190,
    			height:400,
    			width:"100%",
    			showAllRecords:true,
    			data:animalData,
    			fields: [
    				{name:"picture",  
    					type:"image", imageURLPrefix:"http://smartclient.com/isomorphic/system/reference/inlineExamples/tiles/images/"},
    				{name:"commonName"},
    				{name:"status"}
    				
    			]            
    		});
    		</script>
    	</body>
    </html>
    Result on FF 3.6.4 on attached image.
    Attached Files

    Comment


      #3
      After 3 hours of searching and a few minutes after last post i found the solution of forum.

      Isomorphic provided a solution here: http://forums.smartclient.com/showpost.php?p=30641&postcount=4

      Comment

      Working...
      X