Comments (12)
而且这个颜色会不停的加深,最后你懂的。。。
from zrender.
没有这个逻辑,我猜不是加深,是透明叠加了,出现了多个shape,看看自己的代码逻辑?
from zrender.
哦,不停的在以前的shape位置继续增加?但是我每次加完后重置一次opacity 就没有这个效果哟
from zrender.
这是你自己写的shape吗?有save和restore不应该啊
from zrender.
不是。。这个是 image.。对了 你的Image图形之所以在FF下面显示不出来是因为这个原因
在后面的image.complete这个判断
//图片已经加载完成
if (window.ActiveXObject) {
if (image.readyState != 'complete') {
return;
}
}
else {
if (!image.complete) {
return;
}
}
和 ctx.drawImage(image, x, y, width, height);都会有问题,所以这里我直接用了new Image()了。
drawStep : function(left, top, num) {
dancer.stepClick.className = "stepclick hide";
var pos1 = left - this.content.pos.left - 45;
var pos2 = top - this.content.pos.top - 21;
var pos3 = pos1 + 84;
var pos4 = pos2 + 36;
var src;
if(1 == num) {
src = "images/nstep.png";
}
else {
src = "images/dstep.png";
}
var shap = {
shape : 'image',
id : zr.newShapeId(),
style : {
x : 0,
y : 0,
image : src,
width : 182,
height : 40,
color:"#A8A8A8",
text : '人力主管部门归档',
textPosition :'inside',
textFont:'bold 15px verdana',
textColor : '#FFF'
},
draggable : true,
position : [pos1, pos2],
onmouseover : function(params) {
var shape = params.target;
if(2 == dancer.opreateNum) {
dancer.stepConnectTip.style.left = shape.position[0] + dancer.content.pos.left - 9 + "px";
dancer.stepConnectTip.style.top = shape.position[1] + dancer.content.pos.top - 9 + "px";
dancer.stepConnectTip.className = "stepConnectTip";
}
},
ondragstart : function(params) {
var shape = params.target;
dancer.draging = true;
dancer.dragTag = shape;
},
onmouseover : function(params) {
},
ondragend : function() {
dancer.draging = false;
dancer.dragTag = "";
},
}
zr.addShape(shap);
zr.render();
if(0 != dancer.shapList.length) {
for(var i = 0, shaper;shaper = dancer.shapList[i++];) {
zr.modShape(shaper.id, {
style : {
opacity: 1
}
});
zr.refresh();
}
}
temp = {"type" : "rectangle", "x1":pos1, "x2":pos3, "y1":pos2, "y2":pos4 ,"id":shap.id};
dancer.shapList.push(temp);
},
这个是我整个绘制图片图形的函数。
from zrender.
http://www.processon.com/
今天同事看到了这个 感觉也很不错
from zrender.
问题解决了吗?发个邮件看看代码或直接给个能访问到了例子看看?
from zrender.
还没有,总体来说目前还是遇到了不少的问题,我想加你QQ和你详细说说 如果方便的话。 我的QQ是775486560
from zrender.
欢迎加入 echarts hi群 1379172
from zrender.
额 发送了消息 没人加入哟。。
from zrender.
百度hi群,不是qq啊~ 1379172
from zrender.
fixed 1.0.6
from zrender.
Related Issues (20)
- 两个非闭合线性图形,每个都有多个线段组成,且两个线段数量不固定,怎么求这两个图形的闭合区域 HOT 1
- 对于svg渲染器,有没有内置的方法将dom转化为zrenderJSON格式
- zrender更改坐标系的问题
- animator.js bug when building vite HOT 1
- Bug: uniapp 环境打包 h5。会注入 wx 全局变量。导致zrender 判断认为微信环境,从而引起echarts 功能异常 HOT 3
- 如何使用zrender绘制Canvas中的ellipse(椭圆弧)
- dispose/mouseup races cause NPE in Handler.isOutsideBoundary() HOT 1
- TS报错了 HOT 1
- [Feature] Support rotation relative to a point other than the origin
- 鼠标从元素上直接移出画布时,从鼠标移出位置进入画布并hover元素时,没有触发元素的mouseover事件。 HOT 3
- 文档问题 HOT 1
- 网络安全漏洞修复
- 网络安全漏洞修复
- 元素拖动后,如果获取新的x,y坐标,而不是position里面的
- 元素上的dragstart事件有问题 HOT 1
- 在触屏设备中,('mouseover')空白处(即无目标区域)是无法触发鼠标事件,click事件是可以触发的
- [vite:reporter] chunk.moduleIds is not iterable
- 导入报错 HOT 2
- SSR broken when Navigator object is defined. Node JS 21.
- decomposeTransform函数调用时parent.invTransform可能为null
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zrender.