什么变量决定了循环插件中非焦点元素的位置



我正在使用迂回插件来循环3个div。每个div的宽度为794px,这使得对焦元素794和不对焦元素315.218px宽的环形交叉点,每个交叉点的一半都被对焦div隐藏。这一切都很好,但显示器的总宽度需要保持在1000px以内(理想情况下为980px,但如果需要,我可以伪造。)

基本上,我想让非焦点div被焦点中的div隐藏3/4,但就我的一生而言,我无法确定需要编辑哪些变量才能做到这一点。不幸的是,它不是许多容易更改的选项之一,如z-index和minScale。我试过minScale,但很明显这行不通。

插件输出以下代码:

<li class="roundabout-moveable-item" style="position: absolute; left: -57px; top: 205px; width: 319.982px; height: 149.513px; opacity: 0.7; z-index: 146; font-size: 5.6px;">

我需要弄清楚是什么改变了左边的位置,使它更靠近舞台的中心,就像这样:

<li class="roundabout-moveable-item" style="position: absolute; left: 5px; top: 205px; width: 319.982px; height: 149.513px; opacity: 0.7; z-index: 146; font-size: 5.6px;">

我试着使用插件的定位功能,但所做的只是将所有东西向左或向右移动。

任何帮助都将不胜感激。一旦我弄清楚了所有这些jquery的东西,这个网站就会很棒!

这是我的.js文件的链接:http://avalon.eaw.com/scripts/jquery.roundabout2.js我有一个溢出:隐藏在上,帮助引导那些没有重点的项目的定位。

我自己也遇到了同样的问题,并调整了上面建议的选项,但没有任何乐趣。我将这些选项重置回默认值,并调整了以下选项,我能够将其放入我的980px容器中:

info.midStage = {
    width: info.stage.width / 2.69,
    //original value was 2.0 - changed to resize the item and move it closer to the middle
    height: info.stage.height / 2
    };
    info.nudge = {
    width: info.midStage.width + (info.stage.width * 0.18),
    //original value was 0.05 - changed to resize the item and move it closer to the middle
    height: info.midStage.height + (info.stage.height * 0.05)
    };

希望这能帮助你或其他人解决这个问题

调整环形交叉路口的宽度/高度设置就可以了。

我仍然认为我没有找到理想的解决方案,但在没有任何指导的情况下,我只是开始仔细研究脚本,到处更改数字,看看发生了什么。我能够通过修改数学来使侧翼元素更接近中心,比如:

(function($) {
    "use strict";
    var defaults, internalData, methods;
    // add default shape
    $.extend({
        roundaboutShapes: {
            def: "lazySusan",
            lazySusan: function (r, a, t) {
                return {
                    x: Math.sin(r + a), 
                    y: (Math.sin(r + 3*Math.PI/2 + a) / 8) * t, 
                    z: (Math.cos(r + a) + 1) / 2,
                    scale: (Math.sin(r + Math.PI/2 + a) / 1.5) + 0.5 // default setting a) / 2.0) changed to bring out of focus elements closer to the middle
                };
            }
        }
    });

为了调整倾斜(对预定义的var根本没有响应),我修改了"顶部"的定义css

// update item
child
    .css({
        left: ((factors.x * info.midStage.width + info.nudge.width) - factors.width / 2.0).toFixed(0) + "px",
        top: ((factors.y * info.midStage.height + info.nudge.height) - factors.height / 1.3).toFixed(0) + "px",
        // default setting is factors.height / 2.0. changed to adjust height ratio of in focus and out of focus items
        width: factors.width + "px",
        height: factors.height + "px",
        opacity: (info.opacity.min + (info.opacity.diff * factors.scale)).toFixed(2),
        zIndex: Math.round(info.zValues.min + (info.zValues.diff * factors.z)),
        fontSize: (factors.adjustedScale * data.startFontSize).toFixed(1) + "px"
    });
    data.currentScale = factors.adjustedScale;

我希望这能帮助到别人。我知道必须有更好的方法,所以如果有人找到答案,请发布!