если колличество символов в часах два и оно меньше 20 то свигаем время на 30
This commit is contained in:
@@ -422,7 +422,31 @@ def send_job(data,message):
|
|||||||
})
|
})
|
||||||
logger.info(f'Shifting the "{data['time_h']}:{data['time_m']}" by {anchorPoint} pixels')
|
logger.info(f'Shifting the "{data['time_h']}:{data['time_m']}" by {anchorPoint} pixels')
|
||||||
bot.send_message(message.chat.id,f'<b>Сдвигаем</b> "<i>{data['time_h']}:{data['time_m']}</i>" на <b>{anchorPoint}</b> пикседей',parse_mode=['html'])
|
bot.send_message(message.chat.id,f'<b>Сдвигаем</b> "<i>{data['time_h']}:{data['time_m']}</i>" на <b>{anchorPoint}</b> пикседей',parse_mode=['html'])
|
||||||
|
|
||||||
|
elif len(data['time_h'])==2 and data['time_h'] < 20:
|
||||||
|
anchorPoint=[30,0]
|
||||||
|
payload['assets'].append({
|
||||||
|
"layerName": "TIME_H",
|
||||||
|
"property": "transform.anchorPoint",
|
||||||
|
"type": "data",
|
||||||
|
"value": anchorPoint
|
||||||
|
})
|
||||||
|
payload['assets'].append({
|
||||||
|
"layerName": "TIME_M",
|
||||||
|
"property": "transform.anchorPoint",
|
||||||
|
"type": "data",
|
||||||
|
"value": anchorPoint
|
||||||
|
})
|
||||||
|
payload['assets'].append({
|
||||||
|
"layerName": "TIME",
|
||||||
|
"property": "transform.anchorPoint",
|
||||||
|
"type": "data",
|
||||||
|
"value": anchorPoint
|
||||||
|
})
|
||||||
|
logger.info(f'Shifting the "{data['time_h']}:{data['time_m']}" by {anchorPoint} pixels')
|
||||||
|
bot.send_message(message.chat.id,f'<b>Сдвигаем</b> "<i>{data['time_h']}:{data['time_m']}</i>" на <b>{anchorPoint}</b> пикседей',parse_mode=['html'])
|
||||||
|
|
||||||
|
|
||||||
payload['assets'].append({
|
payload['assets'].append({
|
||||||
"type": "data",
|
"type": "data",
|
||||||
"layerName": "TIME_H",
|
"layerName": "TIME_H",
|
||||||
|
|||||||
Reference in New Issue
Block a user