0

この問題を抱えているのは私だけではありません。

グラデーション塗りつぶしを使用するカスタム Ext.draw.Component があります。私の理解では、古いブラウザーはグラデーションをサポートしていませんが、Sencha はレンダリングされるオブジェクトに CSS を追加することでそれを説明していると思いました。

Chromeのコンポーネント: IEクロム のコンポーネント: IE

したがって、私の質問は次のとおりです。

  1. Ext.js は IE8 と IE9 にグラデーションをレンダリングできますか? (IE10なら問題なく表示されます)
  2. ブラウザがグラデーションをレンダリングしないかどうかを判断する方法はありますか?何か他のものを表示することができます (つまり、IE のコンポーネントは白い楕円がなくてもそれほど悪くはありません)。

更新
信号を生成するコードは次のとおりです。http://jsfiddle.net/wilsjd/Ts2qU/10/

    var sencha = Ext.create('Ext.draw.Component', {
        width: 170,
        height: 170,
        renderTo: this.get('elementToRenderTo'),
        gradients: [{
            id: 'middleGradient',
            angle: 180,
            stops: {
                0: {
                    color: this.get('backgroundColor'),
                    opacity: 1
                },
                50: {
                    color: this.get('backgroundColor'),
                    opacity: .6
                },
                100: {
                    color: this.get('backgroundColor'),
                    opacity: 1
                }
            }
        }, {
            id: 'lightGradient1',
            angle: -90,
            stops: {
                0: {
                    color: '#ffffff',
                    opacity: 0.01
                },

                100: {
                    color: '#ffffff',
                    opacity: .8
                }

            }
        }, {
            type: 'radial',
            id: 'radialGradient1',
            centerX:123.88702,
            centerY:391.47498,
            radius:166.47372,
            focalX:124.57159,
            focalY:391.47498,
            stops: {
                0: {
                    color: '#ffffff',
                    opacity: 0.01
                },

                100: {
                    color: '#ffffff',
                    opacity: .8
                }

            }
        }],
        items: [{
            type: 'rect',
            x: 1.6620979,
            y: 52.362183,
            radius: 90,
            width: 448.10959,
            height: 1000,
            fill: 'url(#middleGradient)',
            stroke: 'none'
        }, {
            type: "circle",
            radius: 140,
            x:224,
            y:896,
            stroke: "#000000",
                'stroke-width': 7,
            fill: this.get('goodColor')
        }, {
            type: "circle",
            x:224,
            y:214,
            radius:140,
            stroke: "#000000",
                'stroke-width': 7,
            fill: this.get('poorColor')
        }, {
            type: "circle",
            x:224,
            y:555,
            radius: 140,
            stroke: "#000000",
                'stroke-width': 7,
            fill: this.get('cautionColor')
        }, {
            type: "ellipse",
            radiusX: 112,
            radiusY: 80,
            x: 224,
            y: 156,
            fill: 'url(#lightGradient1)'
        }, {
            type: "ellipse",
            radiusX: 112,
            radiusY: 80,
            x: 224,
            y: 498,
            fill: 'url(#lightGradient1)'
        }, {
            type: "ellipse",
            radiusX: 112,
            radiusY: 80,
            x: 224,
            y: 838,
            fill: 'url(#lightGradient1)'
        }, {
            type: "text",
            text: this.get('poorValue'),
            x: poorValueX,
            y: 210,
            fill: "Black",
            font: "80px bold"
        }, {
            type: "text",
            text: this.get('cautionValue'),
            x: cautionValueX,
            y: 550,
            fill: "Black",
            font: "80px bold"
        }, {
            type: "text",
            text: this.get('goodValue'),
            x: goodValueX,
            y: 890,
            fill: "Black",
            font: "80px bold"
        }, {
            type: "text",
            text: poorLabel,
            x: 500,
            y: 210 + poorChangeY,
            fill: "Black",
            font: "80px bold"
        }, {
            type: "text",
            text: cautionLabel,
            x: 500,
            y: 550 + cautionChangeY,
            fill: "Black",
            font: "80px bold"
        }, {
            type: "text",
            text: goodLabel,
            x: 500,
            y: 890 + goodChangeY,
            fill: "Black",
            font: "80px bold"
        }, {
            type: "text",
            text: this.get('title'),
            x: 0,
            y: 0,
            fill: "Black",
            font: "100px bold"
        }, {
            type: "text",
            text: "Total = " + this.get('total'),
            x: 100,
            y: 1150,
            fill: "Black",
            font: "80px bold"
        }]
    });
4

1 に答える 1

0
  1. Ext.js は確かに IE でグラデーションをレンダリングできますが、この場合は機能しません (理由を判断するにはソースが必要です)
  2. ブラウザーが IE8 か IE9 かを判断する if ステートメントを追加し (ドキュメント モードも確認しました - IE8 ドキュメント モードの場合、IE10 は機能しません)、省略記号を追加します)。
于 2013-05-13T17:45:21.277 に答える