Commit 6253f89d authored by 黄奎's avatar 黄奎

111

parent aa140b9d
...@@ -141,7 +141,9 @@ const getColorShade = async (newSlides:any) => { ...@@ -141,7 +141,9 @@ const getColorShade = async (newSlides:any) => {
} }
let x = newSlides[i] let x = newSlides[i]
let eles = x.elements.filter(y=>y.layerName && y.layerName.indexOf('logo')!=-1) let eles = x.elements.filter(y=>y.layerName && y.layerName.indexOf('logo')!=-1)
let newElementsImg = await ResolveTripLogoHandler(eles,i,dark,day) let newElementsImg = await ResolveTripLogoHandler(eles,i,dark,day)
console.log("newElementsImg",newElementsImg)
let newElements = [] let newElements = []
x.elements.forEach(y=>{ x.elements.forEach(y=>{
if(newElementsImg?.elements){ if(newElementsImg?.elements){
...@@ -169,12 +171,13 @@ const ResolveTripLogoHandler = async (items:any, slideIndex:number,dark:false,da ...@@ -169,12 +171,13 @@ const ResolveTripLogoHandler = async (items:any, slideIndex:number,dark:false,da
let y = templateObj[i] let y = templateObj[i]
let tempSize = await FileService.getImageSizeWithoutDownloading(templateObj[i].src) let tempSize = await FileService.getImageSizeWithoutDownloading(templateObj[i].src)
let scale = parseInt(tempSize.width/tempSize.height) let scale = parseInt(tempSize.width/tempSize.height)
console.log("scale",scale);
let url = '' let url = ''
// if(Colors[1]||scale==6) templateObj[i].filters.invert = '20%' // if(Colors[1]||scale==6) templateObj[i].filters.invert = '20%'
if(scale==1&&!day) url = dark==true?acquiesceLogo.value[0]:acquiesceLogo.value[3] if(scale==1&&!day) url = dark==true?acquiesceLogo.value[0]:acquiesceLogo.value[3]
if(scale==1&&day) url = acquiesceLogo.value[6] if(scale==1&&day) url = acquiesceLogo.value[6]
if(scale<1) url = dark==true?acquiesceLogo.value[1]:acquiesceLogo.value[4] if(scale<1) url = dark==true?acquiesceLogo.value[1]:acquiesceLogo.value[4]
if(scale==6) url = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5] if(scale==6||scale==5) url = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5]
if(scale==3&&!day) url = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5] if(scale==3&&!day) url = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5]
if(scale==3&&day) url = acquiesceLogo.value[2] if(scale==3&&day) url = acquiesceLogo.value[2]
let newTempSize = await FileService.getImageSizeWithoutDownloading(url) let newTempSize = await FileService.getImageSizeWithoutDownloading(url)
......
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