Commit 53511fc5 by Jung Juyeong

TECCSプロジェクトのオーサリングツールに追加した「呼出リスト」ボタンをプレビューで表示できるように修正

parent 0f1d4b1a
...@@ -1642,7 +1642,7 @@ CONTENTVIEW.oldContent_Back = function() { ...@@ -1642,7 +1642,7 @@ CONTENTVIEW.oldContent_Back = function() {
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){ if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW.changePageWithoutSlide(oldContent.oldPageIndex); CONTENTVIEW.changePageWithoutSlide(oldContent.oldPageIndex);
} }
/*remove*/ /*remove*/
oldDataBack.splice(oldDataBack.length - 1, 1); oldDataBack.splice(oldDataBack.length - 1, 1);
...@@ -2104,27 +2104,27 @@ CONTENTVIEW.displayOverlayForHtmlAndMediaType = function(){ ...@@ -2104,27 +2104,27 @@ CONTENTVIEW.displayOverlayForHtmlAndMediaType = function(){
//360vtourの場合戻るボタンを処理する //360vtourの場合戻るボタンを処理する
CONTENTVIEW.panoOldContent = function(){ CONTENTVIEW.panoOldContent = function(){
var oldPageNo = null; var oldPageNo = null;
if(ClientData.IsJumpBack() == true){ if(ClientData.IsJumpBack() == true){
var oldDataBack = ClientData.JumpQueue(); var oldDataBack = ClientData.JumpQueue();
oldPageNo = oldDataBack[oldDataBack.length - 1].oldPageIndex; oldPageNo = oldDataBack[oldDataBack.length - 1].oldPageIndex;
oldDataBack.splice(oldDataBack.length - 1, 1); oldDataBack.splice(oldDataBack.length - 1, 1);
ClientData.JumpQueue(oldDataBack); ClientData.JumpQueue(oldDataBack);
if(oldDataBack.length == 0){ if(oldDataBack.length == 0){
ClientData.IsJumpBack(false); ClientData.IsJumpBack(false);
} }
} }
return oldPageNo; return oldPageNo;
}; };
CONTENTVIEW.createSessionForPanoramaContent = function(apiUrl, func, linkUrlTmp){ CONTENTVIEW.createSessionForPanoramaContent = function(apiUrl, func, linkUrlTmp){
var params = { var params = {
sid: ClientData.userInfo_sid() sid: ClientData.userInfo_sid()
}; };
...@@ -2184,23 +2184,23 @@ CONTENTVIEW.displayOverlayForSpecifyContentType = function( resourceUrl ){ ...@@ -2184,23 +2184,23 @@ CONTENTVIEW.displayOverlayForSpecifyContentType = function( resourceUrl ){
CONTENTVIEW.handleForContentTypeEnquete(resourceUrl); CONTENTVIEW.handleForContentTypeEnquete(resourceUrl);
} }
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie){ else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie){
var url = ClientData.conf_apiUrl(); var url = ClientData.conf_apiUrl();
var linkUrlTmp = AVWEB.format(url, ClientData.userInfo_accountPath()); var linkUrlTmp = AVWEB.format(url, ClientData.userInfo_accountPath());
var apiUrl = linkUrlTmp + "/createSession/"; var apiUrl = linkUrlTmp + "/createSession/";
CONTENTVIEW.panoOldContent(); CONTENTVIEW.panoOldContent();
linkUrlTmp = linkUrlTmp.substring(0, linkUrlTmp.length - 6) + "shop/panorama/play/" + CONTENTVIEW_GENERAL.contentID + "/"; linkUrlTmp = linkUrlTmp.substring(0, linkUrlTmp.length - 6) + "shop/panorama/play/" + CONTENTVIEW_GENERAL.contentID + "/";
CONTENTVIEW.createSessionForPanoramaContent(apiUrl,function(){ CONTENTVIEW.createSessionForPanoramaContent(apiUrl,function(){
CONTENTVIEW.handleForContentTypePanoMovie(linkUrlTmp); CONTENTVIEW.handleForContentTypePanoMovie(linkUrlTmp);
}, linkUrlTmp); }, linkUrlTmp);
} }
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoImage){ else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoImage){
var url = ClientData.conf_apiUrl(); var url = ClientData.conf_apiUrl();
var linkUrlTmp = AVWEB.format(url, ClientData.userInfo_accountPath()); var linkUrlTmp = AVWEB.format(url, ClientData.userInfo_accountPath());
var apiUrl = linkUrlTmp + "/createSession/"; var apiUrl = linkUrlTmp + "/createSession/";
var oldPageNo = CONTENTVIEW.panoOldContent(); var oldPageNo = CONTENTVIEW.panoOldContent();
if(oldPageNo != null){ if(oldPageNo != null){
linkUrlTmp = linkUrlTmp.substring(0, linkUrlTmp.length - 6) + "shop/vtour/play/" + CONTENTVIEW_GENERAL.contentID + "/" + "?startscene=scene" + oldPageNo+"&a=1"; linkUrlTmp = linkUrlTmp.substring(0, linkUrlTmp.length - 6) + "shop/vtour/play/" + CONTENTVIEW_GENERAL.contentID + "/" + "?startscene=scene" + oldPageNo+"&a=1";
...@@ -2209,25 +2209,25 @@ CONTENTVIEW.displayOverlayForSpecifyContentType = function( resourceUrl ){ ...@@ -2209,25 +2209,25 @@ CONTENTVIEW.displayOverlayForSpecifyContentType = function( resourceUrl ){
}else{ }else{
linkUrlTmp = linkUrlTmp.substring(0, linkUrlTmp.length - 6) + "shop/vtour/play/" + CONTENTVIEW_GENERAL.contentID + "/"; linkUrlTmp = linkUrlTmp.substring(0, linkUrlTmp.length - 6) + "shop/vtour/play/" + CONTENTVIEW_GENERAL.contentID + "/";
} }
CONTENTVIEW.createSessionForPanoramaContent(apiUrl,function(){ CONTENTVIEW.createSessionForPanoramaContent(apiUrl,function(){
CONTENTVIEW.handleForContentTypePanoImage(linkUrlTmp); CONTENTVIEW.handleForContentTypePanoImage(linkUrlTmp);
},linkUrlTmp); },linkUrlTmp);
} }
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_ObjectVR){ else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_ObjectVR){
var url = ClientData.conf_apiUrl(); var url = ClientData.conf_apiUrl();
var linkUrlTmp = AVWEB.format(url, ClientData.userInfo_accountPath()); var linkUrlTmp = AVWEB.format(url, ClientData.userInfo_accountPath());
var apiUrl = linkUrlTmp + "/createSession/"; var apiUrl = linkUrlTmp + "/createSession/";
CONTENTVIEW.panoOldContent(); CONTENTVIEW.panoOldContent();
linkUrlTmp = linkUrlTmp.substring(0, linkUrlTmp.length - 6) + "shop/objectvr/play/" + CONTENTVIEW_GENERAL.contentID + "/"; linkUrlTmp = linkUrlTmp.substring(0, linkUrlTmp.length - 6) + "shop/objectvr/play/" + CONTENTVIEW_GENERAL.contentID + "/";
CONTENTVIEW.createSessionForPanoramaContent(apiUrl,function(){ CONTENTVIEW.createSessionForPanoramaContent(apiUrl,function(){
CONTENTVIEW.handleForContentTypeObjectVR(linkUrlTmp); CONTENTVIEW.handleForContentTypeObjectVR(linkUrlTmp);
}, linkUrlTmp); }, linkUrlTmp);
} }
if (COMMON.isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) { if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
CONTENTVIEW_GENERAL.standardRatio = document.documentElement.clientWidth / window.innerWidth; CONTENTVIEW_GENERAL.standardRatio = document.documentElement.clientWidth / window.innerWidth;
...@@ -2569,9 +2569,9 @@ CONTENTVIEW.handleForContentTypeEnquete = function(resourceUrl){ ...@@ -2569,9 +2569,9 @@ CONTENTVIEW.handleForContentTypeEnquete = function(resourceUrl){
//Check type of content //Check type of content
CONTENTVIEW.isMediaAndHTMLContent = function(){ CONTENTVIEW.isMediaAndHTMLContent = function(){
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Music || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Video || if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Music || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Video ||
CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Html || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Html ||
CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoImage || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoImage ||
CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_ObjectVR){ CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_ObjectVR){
return true; return true;
} }
...@@ -2586,8 +2586,8 @@ CONTENTVIEW.enableSpecifyControl = function(){ ...@@ -2586,8 +2586,8 @@ CONTENTVIEW.enableSpecifyControl = function(){
//Disable All control //Disable All control
CONTENTVIEW_GENERAL.disableAllControl(); CONTENTVIEW_GENERAL.disableAllControl();
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Html || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Music || if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Html || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Music ||
CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Video || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Video || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie ||
CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoImage || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_ObjectVR){ CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoImage || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_ObjectVR){
CONTENTVIEW.enableControlForMediaAndHtmlType(); CONTENTVIEW.enableControlForMediaAndHtmlType();
...@@ -2611,7 +2611,7 @@ CONTENTVIEW.enableControlForMediaAndHtmlType = function(){ ...@@ -2611,7 +2611,7 @@ CONTENTVIEW.enableControlForMediaAndHtmlType = function(){
$("#control_screen").bind('click', CONTENTVIEW.fullScreenForNotPdfType); $("#control_screen").bind('click', CONTENTVIEW.fullScreenForNotPdfType);
$("#control_screen_2").bind('click', CONTENTVIEW.originalScreenForNotPdfType); $("#control_screen_2").bind('click', CONTENTVIEW.originalScreenForNotPdfType);
if (COMMON.isTouchDevice() == true) {/* set css for device */ if (COMMON.isTouchDevice() == true) {/* set css for device */
$('#imgHome').addClass('home_device'); $('#imgHome').addClass('home_device');
$('#imgBack').addClass('back_device'); $('#imgBack').addClass('back_device');
...@@ -2714,8 +2714,8 @@ CONTENTVIEW.originalScreenForNotPdfType = function(){ ...@@ -2714,8 +2714,8 @@ CONTENTVIEW.originalScreenForNotPdfType = function(){
$container.css('background-color', 'white'); $container.css('background-color', 'white');
$container.css('overflow', 'scroll'); $container.css('overflow', 'scroll');
$container.css('-webkit-overflow-scrolling', 'touch'); $container.css('-webkit-overflow-scrolling', 'touch');
}else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie || }else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie ||
CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoImage || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoImage ||
CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_ObjectVR){ CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_ObjectVR){
$container.css('left','0%'); $container.css('left','0%');
$container.css('position','absolute'); $container.css('position','absolute');
...@@ -3107,6 +3107,7 @@ CONTENTVIEW.ContentPage.prototype.addPageObjects = function (pageObjects) { ...@@ -3107,6 +3107,7 @@ CONTENTVIEW.ContentPage.prototype.addPageObjects = function (pageObjects) {
obj.enquete, obj.enquete,
obj.objectId obj.objectId
); );
//チェックボタン
} else if (obj.actionType == 16) { } else if (obj.actionType == 16) {
pageObj = new CONTENTVIEW_CREATEOBJECT.imageNoAction( /* checkBtn no action */ pageObj = new CONTENTVIEW_CREATEOBJECT.imageNoAction( /* checkBtn no action */
obj.mediaType, obj.mediaType,
...@@ -3119,7 +3120,21 @@ CONTENTVIEW.ContentPage.prototype.addPageObjects = function (pageObjects) { ...@@ -3119,7 +3120,21 @@ CONTENTVIEW.ContentPage.prototype.addPageObjects = function (pageObjects) {
obj.height, obj.height,
obj.visible obj.visible
); );
} //呼出リストボタン
} else if (obj.actionType == 18) {
pageObj = new CONTENTVIEW_CREATEOBJECT.imageNoAction(
obj.mediaType,
obj.actionType,
obj.id,
obj.imageUrl,
obj.x,
obj.y,
obj.width,
obj.height,
obj.visible
);
}
break; break;
case 2: case 2:
pageObj = new CONTENTVIEW_CREATEOBJECT.videoType2( pageObj = new CONTENTVIEW_CREATEOBJECT.videoType2(
...@@ -4961,32 +4976,32 @@ CONTENTVIEW.showVideoObject = function(x, y, width, height, src, isFullscreen) { ...@@ -4961,32 +4976,32 @@ CONTENTVIEW.showVideoObject = function(x, y, width, height, src, isFullscreen) {
CONTENTVIEW_GETDATA.getPosVideo(x, y, width, height); CONTENTVIEW_GETDATA.getPosVideo(x, y, width, height);
if (isFullscreen === false) { if (isFullscreen === false) {
//#17378 Chromeで差し替え動画の再生ボタンを連続クリックすると、動画が再生されなくなる問題の対応 //#17378 Chromeで差し替え動画の再生ボタンを連続クリックすると、動画が再生されなくなる問題の対応
var isCreateVideo = true; var isCreateVideo = true;
if($('#videoOnPage').length){ if($('#videoOnPage').length){
//表示位置が同じか判定 //表示位置が同じか判定
var pos = $('#playvideo').position(); var pos = $('#playvideo').position();
if(pos.left == pt1.x && pos.top == pt1.y){ if(pos.left == pt1.x && pos.top == pt1.y){
isCreateVideo = false; isCreateVideo = false;
} }
} }
if($('#videoOnPage').length && !isCreateVideo){ if($('#videoOnPage').length && !isCreateVideo){
//ソースのみ入替え //ソースのみ入替え
var videoObj = document.getElementById('videoOnPage'); var videoObj = document.getElementById('videoOnPage');
videoObj.setAttribute("src", src); videoObj.setAttribute("src", src);
videoObj.load(); videoObj.load();
} else { } else {
$('#playvideo').attr('z-order', '10000'); $('#playvideo').attr('z-order', '10000');
$('#playvideo').css('left', pt1.x + 'px'); $('#playvideo').css('left', pt1.x + 'px');
$('#playvideo').css('top', pt1.y + 'px'); $('#playvideo').css('top', pt1.y + 'px');
$('#playvideo').children().remove(); $('#playvideo').children().remove();
if (ClientData.userOpt_videoMode() == "1") {/* loop video */ if (ClientData.userOpt_videoMode() == "1") {/* loop video */
$('#playvideo').html('<video class="mov" id="videoOnPage" ' + $('#playvideo').html('<video class="mov" id="videoOnPage" ' +
'width="' + (pt2.x - pt1.x) + '" ' + 'width="' + (pt2.x - pt1.x) + '" ' +
...@@ -4997,7 +5012,7 @@ CONTENTVIEW.showVideoObject = function(x, y, width, height, src, isFullscreen) { ...@@ -4997,7 +5012,7 @@ CONTENTVIEW.showVideoObject = function(x, y, width, height, src, isFullscreen) {
//' <source src="' + src + '&key=' + (new Date()).toIdString() + '" type="video/ogg"> ' + //' <source src="' + src + '&key=' + (new Date()).toIdString() + '" type="video/ogg"> ' +
'</video>' '</video>'
); );
} else { } else {
$('#playvideo').html('<video class="mov" id="videoOnPage"' + $('#playvideo').html('<video class="mov" id="videoOnPage"' +
'width="' + (pt2.x - pt1.x) + '" ' + 'width="' + (pt2.x - pt1.x) + '" ' +
...@@ -5106,14 +5121,14 @@ CONTENTVIEW.changeImageType4 = function(objTarget, nIndex, nIndex1) { ...@@ -5106,14 +5121,14 @@ CONTENTVIEW.changeImageType4 = function(objTarget, nIndex, nIndex1) {
contextObject.fillRect(tmpX, tmpY, tmpW+1, tmpH+1); contextObject.fillRect(tmpX, tmpY, tmpW+1, tmpH+1);
var aspectType = objTarget[nIndex].aspectType; var aspectType = objTarget[nIndex].aspectType;
if(aspectType == '1'){ if(aspectType == '1'){
var drawObj = CONTENTVIEW.adjustAspectRatio(tmpX, tmpY, tmpW, tmpH, imageObj.width, imageObj.height); var drawObj = CONTENTVIEW.adjustAspectRatio(tmpX, tmpY, tmpW, tmpH, imageObj.width, imageObj.height);
tmpX = drawObj.drawX; tmpX = drawObj.drawX;
tmpY = drawObj.drawY; tmpY = drawObj.drawY;
tmpW = drawObj.drawW; tmpW = drawObj.drawW;
tmpH = drawObj.drawH; tmpH = drawObj.drawH;
} }
contextObject.drawImage(imageObj, tmpX, tmpY, tmpW, tmpH); contextObject.drawImage(imageObj, tmpX, tmpY, tmpW, tmpH);
...@@ -6136,7 +6151,7 @@ CONTENTVIEW.ready = function(initContentId){ ...@@ -6136,7 +6151,7 @@ CONTENTVIEW.ready = function(initContentId){
ClientData.JumpQueue([]); ClientData.JumpQueue([]);
ClientData.IsJumpBack(false); ClientData.IsJumpBack(false);
//オーサリングプレビュー対応 //オーサリングプレビュー対応
if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){ if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
// Show system error // Show system error
...@@ -6238,19 +6253,19 @@ CONTENTVIEW.resvCustomLog = function(param1,param2,param3,param4,param5){ ...@@ -6238,19 +6253,19 @@ CONTENTVIEW.resvCustomLog = function(param1,param2,param3,param4,param5){
}; };
CONTENTVIEW.panoLog = function(log, scheme){ CONTENTVIEW.panoLog = function(log, scheme){
if(scheme == "abookdetaillog"){ if(scheme == "abookdetaillog"){
var panoObjectLog = log; var panoObjectLog = log;
//Panomovieの詳細ログ作成 //Panomovieの詳細ログ作成
var objectLog = new ObjectLogEntity(); var objectLog = new ObjectLogEntity();
objectLog.contentid = CONTENTVIEW_GENERAL.contentID; objectLog.contentid = CONTENTVIEW_GENERAL.contentID;
objectLog.actionDate = new Date(); objectLog.actionDate = new Date();
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_ObjectVR){ if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_ObjectVR){
objectLog.pageNo = "1"; objectLog.pageNo = "1";
}else{ }else{
objectLog.pageNo = panoObjectLog.pageNo; objectLog.pageNo = panoObjectLog.pageNo;
} }
objectLog.objectId = panoObjectLog.objectId; objectLog.objectId = panoObjectLog.objectId;
objectLog.resourceId = panoObjectLog.resourceId; objectLog.resourceId = panoObjectLog.resourceId;
objectLog.mediaType = panoObjectLog.mediaType; objectLog.mediaType = panoObjectLog.mediaType;
...@@ -6262,19 +6277,19 @@ CONTENTVIEW.panoLog = function(log, scheme){ ...@@ -6262,19 +6277,19 @@ CONTENTVIEW.panoLog = function(log, scheme){
objectLog.locationHeight = panoObjectLog.locationHeight; objectLog.locationHeight = panoObjectLog.locationHeight;
objectLog.locationWidth = panoObjectLog.locationWidth; objectLog.locationWidth = panoObjectLog.locationWidth;
objectLog.eventType = panoObjectLog.eventType; objectLog.eventType = panoObjectLog.eventType;
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog); COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
}else if(scheme == "abookmovepage"){ }else if(scheme == "abookmovepage"){
var panoPageLog = log; var panoPageLog = log;
//if(panoPageLog.pageNo == null){ //if(panoPageLog.pageNo == null){
// CONTENTVIEW_GENERAL.panoPageNo = 1; // CONTENTVIEW_GENERAL.panoPageNo = 1;
//} else { //} else {
// CONTENTVIEW_GENERAL.panoPageNo = panoPageLog.pageNo; // CONTENTVIEW_GENERAL.panoPageNo = panoPageLog.pageNo;
//} //}
//COMMON.SetPageLog( CONTENTVIEW_GENERAL.contentID, CONTENTVIEW_GENERAL.panoPageNo); //COMMON.SetPageLog( CONTENTVIEW_GENERAL.contentID, CONTENTVIEW_GENERAL.panoPageNo);
CONTENTVIEW_GENERAL.panoPageNo = panoPageLog.pageNo; CONTENTVIEW_GENERAL.panoPageNo = panoPageLog.pageNo;
if(panoPageLog.pageNo == null){ if(panoPageLog.pageNo == null){
COMMON.SetPageLog( CONTENTVIEW_GENERAL.contentID, 1); COMMON.SetPageLog( CONTENTVIEW_GENERAL.contentID, 1);
...@@ -6352,7 +6367,7 @@ CONTENTVIEW.panoContentLink = function(targetContentId, page){ ...@@ -6352,7 +6367,7 @@ CONTENTVIEW.panoContentLink = function(targetContentId, page){
else if(data.contentData.alertMessageLevel == CONTENTVIEW_CREATEOBJECT.alertMessageLevel.None){ else if(data.contentData.alertMessageLevel == CONTENTVIEW_CREATEOBJECT.alertMessageLevel.None){
if(data.contentData.contentType == COMMON.ContentTypeKeys.Type_Link){ if(data.contentData.contentType == COMMON.ContentTypeKeys.Type_Link){
COMMON.viewLinkContentById(targetContentId, true); COMMON.viewLinkContentById(targetContentId, true);
}else if(data.contentData.contentType == COMMON.ContentTypeKeys.Type_Others){ }else if(data.contentData.contentType == COMMON.ContentTypeKeys.Type_Others){
COMMON.downloadResourceById(targetContentId); COMMON.downloadResourceById(targetContentId);
}else{ }else{
...@@ -6364,7 +6379,7 @@ CONTENTVIEW.panoContentLink = function(targetContentId, page){ ...@@ -6364,7 +6379,7 @@ CONTENTVIEW.panoContentLink = function(targetContentId, page){
var dataJump = ClientData.JumpQueue(); var dataJump = ClientData.JumpQueue();
dataJump.push(oldContent); dataJump.push(oldContent);
ClientData.JumpQueue(dataJump); ClientData.JumpQueue(dataJump);
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isMobile() && ClientData.isGetitsMode()) { if (CONTENTVIEW_GENERAL.avwUserEnvObj.isMobile() && ClientData.isGetitsMode()) {
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentViewGetits); AVWEB.avwScreenMove(COMMON.ScreenIds.ContentViewGetits);
} else { } else {
...@@ -6383,7 +6398,7 @@ CONTENTVIEW.panoContentLink = function(targetContentId, page){ ...@@ -6383,7 +6398,7 @@ CONTENTVIEW.panoContentLink = function(targetContentId, page){
var dataJump = ClientData.JumpQueue(); var dataJump = ClientData.JumpQueue();
dataJump.push(oldContent); dataJump.push(oldContent);
ClientData.JumpQueue(dataJump); ClientData.JumpQueue(dataJump);
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isMobile() && ClientData.isGetitsMode()) { if (CONTENTVIEW_GENERAL.avwUserEnvObj.isMobile() && ClientData.isGetitsMode()) {
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentViewGetits); AVWEB.avwScreenMove(COMMON.ScreenIds.ContentViewGetits);
} else { } else {
...@@ -6408,38 +6423,38 @@ CONTENTVIEW.receiveSize = function(e) { ...@@ -6408,38 +6423,38 @@ CONTENTVIEW.receiveSize = function(e) {
//if (e.origin === "http://hogehoge.com") // for security: set this to the domain of the iframe - use e.uri if you need more specificity //if (e.origin === "http://hogehoge.com") // for security: set this to the domain of the iframe - use e.uri if you need more specificity
// document.getElementById("bar").style.height = e.data + "px"; // document.getElementById("bar").style.height = e.data + "px";
//console.log("receiveSize:" + e.data); //console.log("receiveSize:" + e.data);
}; };
window.addEventListener("message", CONTENTVIEW.receiveSize, false); window.addEventListener("message", CONTENTVIEW.receiveSize, false);
//差し替え画像のアスペクト比維持対応 //差し替え画像のアスペクト比維持対応
CONTENTVIEW.adjustAspectRatio = function(drawX, drawY, drawW, drawH, srcImageW, srcImageH){ CONTENTVIEW.adjustAspectRatio = function(drawX, drawY, drawW, drawH, srcImageW, srcImageH){
var drawObj = {}; var drawObj = {};
drawObj.drawX = drawX; drawObj.drawX = drawX;
drawObj.drawY = drawY; drawObj.drawY = drawY;
drawObj.drawH = drawH; drawObj.drawH = drawH;
drawObj.drawW = drawW; drawObj.drawW = drawW;
var tmpRatioImage; var tmpRatioImage;
var tmpX = drawObj.drawX; var tmpX = drawObj.drawX;
var tmpY = drawObj.drawY; var tmpY = drawObj.drawY;
var tmpH = drawObj.drawH; var tmpH = drawObj.drawH;
var tmpW = drawObj.drawW; var tmpW = drawObj.drawW;
//描画エリアが縦長か横長か判定 //描画エリアが縦長か横長か判定
if( drawObj.drawW > drawObj.drawH ){ if( drawObj.drawW > drawObj.drawH ){
//描画エリア横長 //描画エリア横長
if(srcImageW > srcImageH){ if(srcImageW > srcImageH){
//ソース画像は横長 //ソース画像は横長
//描画エリアとソース画像の比率計算 //描画エリアとソース画像の比率計算
var drawRatio = drawObj.drawH / drawObj.drawW; var drawRatio = drawObj.drawH / drawObj.drawW;
var srcRatio = srcImageH / srcImageW; var srcRatio = srcImageH / srcImageW;
//console.log("drawRatio:" + drawRatio); //console.log("drawRatio:" + drawRatio);
//console.log("srcRatio:" + srcRatio); //console.log("srcRatio:" + srcRatio);
if( drawRatio < srcRatio ){ if( drawRatio < srcRatio ){
tmpH = drawObj.drawH; tmpH = drawObj.drawH;
tmpRatioImage = drawObj.drawH / srcImageH; tmpRatioImage = drawObj.drawH / srcImageH;
...@@ -6449,13 +6464,13 @@ CONTENTVIEW.adjustAspectRatio = function(drawX, drawY, drawW, drawH, srcImageW, ...@@ -6449,13 +6464,13 @@ CONTENTVIEW.adjustAspectRatio = function(drawX, drawY, drawW, drawH, srcImageW,
tmpRatioImage = drawObj.drawW / srcImageW; tmpRatioImage = drawObj.drawW / srcImageW;
tmpH = srcImageH * tmpRatioImage; tmpH = srcImageH * tmpRatioImage;
} }
} else { } else {
//ソース画像は縦長か正方形 //ソース画像は縦長か正方形
tmpRatioImage = drawObj.drawH / srcImageH; tmpRatioImage = drawObj.drawH / srcImageH;
tmpW = srcImageW * tmpRatioImage; tmpW = srcImageW * tmpRatioImage;
} }
} else { } else {
//描画エリア縦長か正方形 //描画エリア縦長か正方形
if(srcImageW > srcImageH){ if(srcImageW > srcImageH){
...@@ -6468,13 +6483,13 @@ CONTENTVIEW.adjustAspectRatio = function(drawX, drawY, drawW, drawH, srcImageW, ...@@ -6468,13 +6483,13 @@ CONTENTVIEW.adjustAspectRatio = function(drawX, drawY, drawW, drawH, srcImageW,
} }
} else { } else {
//ソース画像は縦長か正方形 //ソース画像は縦長か正方形
//描画エリアとソース画像の比率計算 //描画エリアとソース画像の比率計算
var drawRatio = drawObj.drawW / drawObj.drawH; var drawRatio = drawObj.drawW / drawObj.drawH;
var srcRatio = srcImageW / srcImageH; var srcRatio = srcImageW / srcImageH;
//console.log("drawRatio:" + drawRatio); //console.log("drawRatio:" + drawRatio);
//console.log("srcRatio:" + srcRatio); //console.log("srcRatio:" + srcRatio);
if( drawRatio < srcRatio ){ if( drawRatio < srcRatio ){
tmpW = drawObj.drawW; tmpW = drawObj.drawW;
tmpRatioImage = drawObj.drawW / srcImageW; tmpRatioImage = drawObj.drawW / srcImageW;
...@@ -6494,9 +6509,9 @@ CONTENTVIEW.adjustAspectRatio = function(drawX, drawY, drawW, drawH, srcImageW, ...@@ -6494,9 +6509,9 @@ CONTENTVIEW.adjustAspectRatio = function(drawX, drawY, drawW, drawH, srcImageW,
// //drawObj.drawW = tmpW; // //drawObj.drawW = tmpW;
//} //}
} }
} }
//表示位置調整 //表示位置調整
if( drawObj.drawW > tmpW ){ if( drawObj.drawW > tmpW ){
//横位置調整 //横位置調整
...@@ -6506,13 +6521,13 @@ CONTENTVIEW.adjustAspectRatio = function(drawX, drawY, drawW, drawH, srcImageW, ...@@ -6506,13 +6521,13 @@ CONTENTVIEW.adjustAspectRatio = function(drawX, drawY, drawW, drawH, srcImageW,
//縦位置調整 //縦位置調整
tmpY = tmpY + (drawObj.drawH - tmpH) / 2; tmpY = tmpY + (drawObj.drawH - tmpH) / 2;
} }
drawObj.drawX = tmpX; drawObj.drawX = tmpX;
drawObj.drawY = tmpY; drawObj.drawY = tmpY;
drawObj.drawW = tmpW; drawObj.drawW = tmpW;
drawObj.drawH = tmpH; drawObj.drawH = tmpH;
return drawObj; return drawObj;
}; };
...@@ -398,6 +398,17 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) { ...@@ -398,6 +398,17 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) {
pageObject['imageUrl'] = null; pageObject['imageUrl'] = null;
} }
} }
else if(iValueObj.action.actionType == 18) {
/*get mediaInfo */
// プレビューでは表示だけで、クリックしても機能しない
if (iValueObj.mediaInfo) {
/* get image from Json */
pageObject['imageUrl'] = AVWEB.getURL("webResourceDownload") + "&sid=" + CONTENTVIEW.getSessionId() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
} else {
pageObject['imageUrl'] = null;
}
}
//End Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary : //End Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary :
return pageObject; return pageObject;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment