front_idill/src/mosaic/js/pointers.js
changeset 112 58ba3ae2d3d9
parent 100 db42ef1faa7a
equal deleted inserted replaced
110:d84290f64c4c 112:58ba3ae2d3d9
  1199 	var notify_credits = $('#notify_credits'), arrowHeight = $('#credits_upArrow').height(), footer_height = $('#credits_footer').height(), margin = parseInt($('#notify_credits').css('margin-left'));
  1199 	var notify_credits = $('#notify_credits'), arrowHeight = $('#credits_upArrow').height(), footer_height = $('#credits_footer').height(), margin = parseInt($('#notify_credits').css('margin-left'));
  1200 	
  1200 	
  1201 	//Si on est sur la première page, on cache la flèche haut.
  1201 	//Si on est sur la première page, on cache la flèche haut.
  1202 	if(this.creditsPageNumber == 0)
  1202 	if(this.creditsPageNumber == 0)
  1203 	{
  1203 	{
  1204 		$('#credits_upArrow').css(
  1204 		$('#credits_upArrow, #credits_upArrow_mask').css(
  1205 		{
  1205 		{
  1206 			opacity: 0
  1206 			opacity: 0
  1207 		});
  1207 		});
  1208 		$('#credits_downArrow').css(
  1208 		$('#credits_downArrow, #credits_downArrow_mask').css(
  1209 		{
  1209 		{
  1210 			opacity: 1
  1210 			opacity: 1
  1211 		});
  1211 		});
  1212 		$('#credits_container').css(
  1212 		$('#credits_container').css(
  1213 		{
  1213 		{
  1216 		});
  1216 		});
  1217 	}
  1217 	}
  1218 	//Si on est sur la dernière page, on cache la flèche bas.
  1218 	//Si on est sur la dernière page, on cache la flèche bas.
  1219 	else if(this.creditsPageNumber + 1 >= this.creditsPageLength)
  1219 	else if(this.creditsPageNumber + 1 >= this.creditsPageLength)
  1220 	{
  1220 	{
  1221 		$('#credits_upArrow').css(
  1221 		$('#credits_upArrow, #credits_upArrow_mask').css(
  1222 		{
  1222 		{
  1223 			opacity: 1
  1223 			opacity: 1
  1224 		});
  1224 		});
  1225 		$('#credits_downArrow').css(
  1225 		$('#credits_downArrow, #credits_downArrow_mask').css(
  1226 		{
  1226 		{
  1227 			opacity: 0
  1227 			opacity: 0
  1228 		});
  1228 		});
  1229 		$('#credits_container').css(
  1229 		$('#credits_container').css(
  1230 		{
  1230 		{
  1233 		});
  1233 		});
  1234 	}
  1234 	}
  1235 	//Si on est dans les autres pages, on affiche les deux flèches.
  1235 	//Si on est dans les autres pages, on affiche les deux flèches.
  1236 	else
  1236 	else
  1237 	{
  1237 	{
  1238 		$('#credits_upArrow').css(
  1238 		$('#credits_upArrow, #credits_upArrow_mask').css(
  1239 		{
  1239 		{
  1240 			opacity: 1
  1240 			opacity: 1
  1241 		});
  1241 		});
  1242 		$('#credits_downArrow').css(
  1242 		$('#credits_downArrow, #credits_downArrow_mask').css(
  1243 		{
  1243 		{
  1244 			opacity: 1
  1244 			opacity: 1
  1245 		});
  1245 		});
  1246 		$('#credits_container').css(
  1246 		$('#credits_container').css(
  1247 		{
  1247 		{
  1248 			top: +arrowHeight + margin,
  1248 			top: +arrowHeight + margin,
  1249 			height: notify_credits.height() - footer_height - 2 * arrowHeight - margin
  1249 			height: notify_credits.height() - footer_height - 2 * arrowHeight - margin
  1250 		});
  1250 		});
  1251 	}
  1251 	}
  1252 	
  1252 	//console.log('in');
  1253 	//On déplace le texte des crédits.
  1253 	//On déplace le texte des crédits.
  1254 	$('#credits_container').css(
  1254 	$('#credits_container').css(
  1255 	{
  1255 	{
  1256 		left: -($('#credits_container').width() * N - parseInt(notify_credits.css('margin-left')))// + this.column_gap)
  1256 		top: -(($('#credits_container').height() - 2 * $('.credits_arrows').height()) * N - parseInt(notify_credits.css('margin-left')))// + this.column_gap)
  1257 	});
  1257 	});
  1258 }
  1258 }
  1259 
  1259 
  1260 /*
  1260 /*
  1261  * Retourne vrai si la souris est sur la flèche haute dans le panneau d'aide.
  1261  * Retourne vrai si la souris est sur la flèche haute dans le panneau d'aide.