小编Cur*_*sey的帖子

将片段ID添加到Zend重定向

也许我很傻,找不到文档.我想在控制器操作重定向中使用的URL末尾添加一个片段ID.这就是我想要做的事情:

return $this->redirect()->toRoute('jobapplication',array('action'=>'edit','id'=>$candidateclass->application_id,'fragment'=>'candidateclass'));
Run Code Online (Sandbox Code Playgroud)

我得到的就是:

http://localhost/Zend/public/jobapplication/edit/21
Run Code Online (Sandbox Code Playgroud)

我想要这个:

http://localhost/Zend/public/jobapplication/edit/21#candidateclass
Run Code Online (Sandbox Code Playgroud)

思考?

zend-framework2

7
推荐指数
1
解决办法
1244
查看次数

D3圆包布局中嵌套圆的工具提示

我在这里敲我的头.我想在Zoomable Pack Layout等结构中显示叶节点的工具提示.叶节点是棕色节点.如果我使用工具提示的标准代码:

vis.selectAll("circle")
    .data(nodes)
   .enter()
    .append("svg:circle")
    .attr("class", function(d) {
        return d.children ? "parent" : "child";
    })
    .attr("cx", function(d) {
        return d.x;
    })
    .attr("cy", function(d) {
        return d.y;
    })
    .attr("r", function(d) {
        return d.r;
    })
    .on("click", function(d) {
        zoom(node == d ? root : d);
    })
    .append("svg:title")
    .text("test");          \\ Browser uses this for tooltips
Run Code Online (Sandbox Code Playgroud)

我在主要圆圈上获得了工具提示,但在叶子节点上没有.我试过了:

.append("svg:title")
.text(function(d) {
    if(d.size){return 'test';}
});
Run Code Online (Sandbox Code Playgroud)

...希望只有当叶子节点包含的变量存在时返回一些东西可能会阻止父节点显示工具提示,但我担心它所做的一切都是允许隐藏的工具提示默默地阻止任何显示.

有什么想法吗?我想我要么堆叠svg:circles,以便叶节点在其他节点前面,或者只将svg:titles附加到叶节点,但我不知道如何做到这一点.

这是工具提示的小提琴: 小提琴

javascript svg tooltip d3.js circle-pack

7
推荐指数
1
解决办法
1894
查看次数

标签 统计

circle-pack ×1

d3.js ×1

javascript ×1

svg ×1

tooltip ×1

zend-framework2 ×1