首页 > 解决方案 > Krpano 场景缩略图在 chrome 版本 87 之后不再可拖动

问题描述

在 chrome 版本 87.0.4273.0(开发人员构建)(64 位)之后,sceneThumb 上可拖动的 Jquuery Ui 不再工作,但代码在最新版本的 firfox 上工作正常。

    <action name="set_css_class" type="Javascript">
        caller.sprite.className = args[1];
    </action>
set(layer[get(thumbname)],
  url=get(scene[get(i)].thumburl),
  keep=true,
  parent='skin_thumbs',
  align='lefttop',
  crop=get(thumbcrop),
  width=get(thumbwidth),
  height=get(thumbheight),
  x=calc(thumbpadding + i*thumbxoffset),
  y=get(thumbpadding),
  linkedscene=get(scene[get(i)].name),
  onclick='copy(layer[skin_thumbborder].parent, name); 
  skin_loadscene(get(linkedscene),get(skin_settings.loadscene_blend));',
  onloaded="set_css_class('sceneThumb');"
  );

在 xml 文件中,这一行onloaded="set_css_class('sceneThumb');指定类名“sceneThumb”

$('.sceneThumb').draggable({
  helper: "clone",
  revert: false,
  start: function(event, ui) {
    console.log("Start sceneThumb");
    ...
  }

而在 html 页面中,“scenThumb”类被称为可拖动功能。

但是,chrome 无法识别此功能,当我尝试拖动它时,没有任何效果,并且控制台也没有打印出任何内容。

谁能帮我?提前致谢。

标签: javascriptjqueryjquery-uikrpano

解决方案


推荐阅读