Giter Club home page Giter Club logo

tangram-base's People

Contributors

ajean avatar aranwong avatar bellcliff avatar catchen avatar chinesedron avatar hackwaly avatar houhaixian avatar huangfangrong avatar jaypei avatar jiazheng avatar leeight avatar linlingyu avatar liujinlong avatar rocy avatar sunner avatar tianlili avatar waltershen avatar webooxx avatar xiadengping avatar zhuwenxuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tangram-base's Issues

不少测试用例无法通过

IE,FIrefox,Chrome,Opera下面都有未通过的测试用例,Linux和Windows平台下面都有问题。
请检查一下。

baidu.each支持object

不知道为何要限制在array中,这个从07年底al的时候就一直是array、object都支持的,为啥忽然去掉了。。。强烈要求加回来

baidu.string.wbr在opera下不工作

其实在这之前,我不知道。-,- 学习了。不过。正则中 lastMatch 的短属性在 opera 是不运行的(其实所有的都不行,除了 $1~9)。so, Tangram 的代码是需要改一下滴。

baidu.object.clone 不完全COPY

如果需要clone的对象的prototype 为 Number,此对象将被直接返回。。。 应该把 instanceof Number 换成 isNumber 吧。。。 String, Boolean 也是

baidu.dom.show在通过css样式隐藏时不起效果

create一个判断不会死的,N年的问题了,记录一下。。。性能根本不是问题,一般都只作用在最上层的节点上,浏览器中render tree的改动导致重新layout才是最耗时的

baidu.event._unload bug

我用baidu.on给一个iframe的contentWindow对象添加onload监听,如果在运行期,iframe页面跳转了,会导致原来绑定的contentWindow对象引用被移除,这导致在baidu.event._unload运行的时候,取出来的之前绑定过的元素为null,在页面卸载时要移除所有事件监听会报错。

baidu.dom.opacity method users 'opacity:' instead of 'opacity='

In the method of baidu.dom.opacity, and it set the opacity using filter with 'xxxxx(opacity__:xxx' instead of 'xxxxx(opacity=__'.
The problem is that if I set the opacity with this method, but I want to get the opacity using the baidu.dom.getStyle, and it won't work.
Frankly speaking, I can't figure out why there exists a method calling baidu.dom.opacity, do you want to provide a shortcut method? or other reasons?

baidu.dom.opacity = function(element, opacity){
    element = baidu.dom.g(element);

    if (!baidu.browser.ie) {
        element.style.opacity = opacity;
        element.style.KHTMLOpacity = opacity;
    } else {
        element.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity:"+
            Math.floor(opacity * 100) +")";
    }
};
baidu.dom._styleFixer.opacity = baidu.browser.ie ? {
    get: function (element) {
        var filter = element.style.filter;
        return filter && filter.indexOf("opacity=") >= 0 ? (parseFloat(filter.match(/opacity=([^)]*)/)[1]) / 100) + "" : "1";
    },

    set: function (element, value) {
        var style = element.style;
        // 只能Quirks Mode下面生效??
        style.filter = (style.filter || "").replace(/alpha\([^\)]*\)/gi, "") + (value == 1 ? "" : "alpha(opacity=" + value * 100 + ")");
        // IE filters only apply to elements with "layout."
        style.zoom = 1;
    }
} : null;

thanks,

starandtina

自定义下载出现异常

复现:
自定义下载 - 我的选择 -
输入baidu.ajax.get,baidu.ajax.post,baidu.object.clone,baidu.object.extend,baidu.json.decode,baidu.json.encode

  • 载入选择 - 导出(yui)

下载下来的js出现了异常,下面是js的一部分
java.io.FileNotFoundException: /home/g/public_html/doc/source/script/1316591308 (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at java.io.FileInputStream.(FileInputStream.java:66)
at com.yahoo.platform.yui.compressor.YUICompressor.main(YUICompressor.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.yahoo.platform.yui.compressor.Bootstrap.main(Bootstrap.java:20)

在页面存在iframe的情况下,dom.draggable的拖拽动作可能停不下来

issue说明

在Chrome中,页面中有iframe存在的情况下,拖拽draggable块以较快速度移入iframe范围内,并立即松开鼠标,此时会出现draggable块一直跟随鼠标,怎么也停不下来。发生的原因是iframe捕捉的mouseup事件,不再向其父级页面传递,导致drag动作没有终止。

下面是复现的测试代码

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>drag</title>
<script type="text/javascript" src="http://tangram.baidu.com/download/tangram-1.3.9.js"></script>
<style type="text/css">
.container{
    float:left; padding-left:50px;
}
.drag-wrap{
    width:300px; height:220px; background:#8888FF; position:relative;
}
.drag-title{
    background:#666666; height:20px; line-height:20px; color:white; cursor:move;
}
</style>
</head>

<body>
<div class="container">
    <div id="widget" class="drag-wrap">
        <div id="title" class="drag-title">drag me</div>
        <div>在页面中有iframe存在的情况下,拖拽draggable块以较快速度移入iframe范围内,并立即松开鼠标,此时会出现draggable块一直跟随鼠标,怎么也停不下来</div>
    </div>
</div>
<iframe src="http://www.google.com.hk" width="500" height="500" frameborder="1"></iframe>
<script type="text/javascript">
baidu.dom.draggable('widget', {
    handler : 'title'
});
</script>
</body>
</html>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.